Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
138 commits
Select commit Hold shift + click to select a range
8d8d5e1
fix docs for soundboard_sound_update event
owocado Jun 20, 2025
7f16a06
Copy Select options when creating View class
LeoCx1000 Jun 20, 2025
3e48119
Fix unreachable code not triggering privileged intent error
frxctura Jun 20, 2025
0ce1154
Add discord.Permissions.apps()
Deprecatism Jun 20, 2025
aa5f4bd
Fix poll parameter defaulting to MISSING instead of None for Context.…
Soheab Jun 20, 2025
680fe9b
Add channel select to component type documentation
Tari-dev Jun 20, 2025
e84edf4
Add colours for new Discord themes
LeoCx1000 Jun 20, 2025
e177b4a
Fix EmbedMediaProxy boolean check
AbstractUmbra Jun 20, 2025
ef06d7d
Add Interaction.filesize_limit
LeoCx1000 Jun 20, 2025
b28a4a1
Fix potentially stuck ratelimit buckets
mikeshardmind Jun 20, 2025
adb93f4
Add deprecation warning to create_guild functions
Gooraeng Jun 20, 2025
4a8817a
Document return object for Guild.create_template
Soheab Jun 20, 2025
667e7c9
Fixed to_dict() bug for user-defined embed classes
cyberoby Jun 20, 2025
2bcbd49
Add __repr__ method to various classes
owocado Jun 20, 2025
c524f65
Use human_join internal helper in BaseChannelTransformer
owocado Jun 20, 2025
826aa22
Add platform key in __repr__ method for Game and Streaming
owocado Jun 20, 2025
fe942d1
Properly transform media channels in app commands
owocado Jun 20, 2025
d00c124
Add MessageApplication.__str__
owocado Jun 20, 2025
4862ea2
Return invites when deleting them via Invite.delete or Client.delete_…
owocado Jun 20, 2025
f6e0f72
Add ability to create a media-only forum channel
Soheab Jun 20, 2025
6af9de0
Ensure COPYING notice is included
mikeshardmind Jun 20, 2025
7fe1102
Allow creating NSFW voice/stage channels
Soheab Jun 20, 2025
e9f807e
Fix Thread.applied_tags for media channels
owocado Jun 20, 2025
a62b25c
Add missing attributes in AppCommandChannel
owocado Jun 20, 2025
20055e7
Fix calculation of hashed rate limit keys
dolfies Jun 26, 2025
2175bd5
Fix voice connection issues and upgrade to voice v8
DA-344 Jun 30, 2025
59546a4
Add support for launch_activity interaction response
Joosemi02 Jul 2, 2025
774b934
Add support for guest invites
Soheab Jul 2, 2025
2502a78
Add BCP47 unicode tags for Locale enum
exorcize Jul 8, 2025
cb73009
Add role parameters to support new gradient and holographic roles
makerze Jul 8, 2025
66922cc
Fix documentation on Role secondary and tertiary colours
DA-344 Jul 9, 2025
b1be7de
Handle empty guild_ids list for app_commands
laggron42 Jul 9, 2025
a005109
Support new role colours in audit log
z03h Jul 9, 2025
13dc9c9
Fix miswording in docstring about bot.emojis
Ken-Miles Jul 15, 2025
7724764
Add ability to use primary guild (clan) data for users
blord0 Jul 18, 2025
0e97ef2
Fix key error on role create or delete
z03h Jul 22, 2025
5f4a822
Add missing fill_with_flags decorator to InviteFlags class
Sacul0457 Jul 27, 2025
e715ad6
Add support for automod_quarantined_guild_tag member flag
Sacul0457 Jul 27, 2025
5b81a99
Fix error when sending non-interactive views via partial webhooks
Amjuks Jul 27, 2025
22ade98
Skip GUILD_MEMBER_ADD if member already cached
tudubucket Jul 27, 2025
ce9f5ad
Fix context install decorators to correctly restrict commands
px1w Apr 28, 2025
2695fa0
Fix guild_only app command decorator
owocado Jul 30, 2025
348c7d7
Fix audit log automod_rule_trigger_type extra missing
AbstractUmbra Jul 30, 2025
6e7fc13
Add support for new RPC Activity fields
Soheab Jul 30, 2025
1cd90f8
[commands] Fix converters not working with Optional for hybrids
Soheab Jul 30, 2025
cb7f170
Deprecate Guild.delete and various parameters for Guild.edit
Soheab Jul 30, 2025
4496df7
Fix crash in Activity.__init__ with missing keys
owocado Jul 30, 2025
21fed31
Add FAQ about guild specific app commands
Soheab Aug 8, 2025
7b3f798
Add support for guild onboarding
Soheab Aug 8, 2025
db42eba
Add more attributes to AppCommandChannel/Thread
Sacul0457 Aug 8, 2025
ec409a0
Guard AppCommandThread.guild attribute access
Rapptz Aug 8, 2025
6ec2e53
Deprecate with_expiration param in fetch_invite
Sacul0457 Aug 12, 2025
50caa3c
Add support for components V2
DA-344 Aug 14, 2025
705eb2c
Update to support new pin endpoints
Soheab Aug 14, 2025
439bd71
Upstream change in Python
mikeshardmind Aug 14, 2025
8c18867
Don't recreate ItemCallbackType
Rapptz Aug 14, 2025
9fb74fd
Remove unnecessary TypeGuard
Rapptz Aug 14, 2025
3fb627d
Add support for label components and select in modals
Rapptz Aug 14, 2025
38c6407
Maintain a reference to View dispatched tasks
Rapptz Aug 14, 2025
773fcc8
Remove outdated note about having to delete owned guild
notSoti Aug 14, 2025
4839036
Add missing guild features in types.guild
Sacul0457 Aug 14, 2025
1343259
Fix various docs around UI items
Soheab Aug 14, 2025
983a9b8
Use Unpack where it's possible
Soheab Aug 15, 2025
08ef967
Typecheck when constructing MediaGalleryItem
Rapptz Aug 15, 2025
7e2ca02
Add total_message_sent attribute to threads
Sacul0457 Aug 15, 2025
4f539b7
Fix type errors in all examples
Rapptz Aug 16, 2025
24d3a12
Remove unused row parameter from TextDisplay
Rapptz Aug 16, 2025
4be15b5
Add example showcasing Container for Embed-like layouts
Rapptz Aug 16, 2025
22d6e8d
Add example showcasing how to do a settings panel
Rapptz Aug 17, 2025
eb84d0d
Add example showcasing ui.Label in modals
Rapptz Aug 18, 2025
2a69ac4
Document difference between View and LayoutView
Rapptz Aug 18, 2025
5887ce1
Fix settings example not resetting option default state
Rapptz Aug 18, 2025
9ef5b05
Refactor total children count to an overrideable method
Rapptz Aug 18, 2025
98d2113
Hide interaction_check where it isn't really applicable
Rapptz Aug 18, 2025
4854c56
Allow discord.File in places where UnfurledMediaItem or str are allowed
Rapptz Aug 18, 2025
0c98251
Move Locale.language_code documentation to where it belongs
Rapptz Aug 18, 2025
6f6d990
Fix type error with ItemCallbackType
Rapptz Aug 18, 2025
76258d0
Add note for File.uri and ASCII only names
Rapptz Aug 18, 2025
13d1fbe
Add more detail to what filenames are allowed in File.uri
Rapptz Aug 18, 2025
e00bb0b
Change info directive to note
Rapptz Aug 18, 2025
f08c042
Add content_length method to LayoutView and container items
Rapptz Aug 18, 2025
064cb7a
Add View.total_children_count
Rapptz Aug 18, 2025
fc12a41
Run black
Rapptz Aug 18, 2025
5d49f11
Remove View.from_dict typing
Rapptz Aug 18, 2025
714df2c
Add changelog for v2.6
Rapptz Aug 18, 2025
9845a53
Version bump to v2.6.0
Rapptz Aug 18, 2025
1bc330a
Version bump for development
Rapptz Aug 18, 2025
d58c055
Remove unused import
Rapptz Aug 18, 2025
3ef6272
Fix error with View.from_message when having multiple items
Rapptz Aug 18, 2025
44a44e9
Reformat entire project with ruff instead of black
Rapptz Aug 19, 2025
ad48815
Add Permissions.pin_messages
Rapptz Aug 19, 2025
a5a4bcf
Update Permissions.manage_messages docstring
Rapptz Aug 19, 2025
9dbf13c
Document Section.accessory as an attribute
Rapptz Aug 19, 2025
24aa98b
Fix Section.children and accessory's parent being None
DA-344 Aug 20, 2025
283ed20
Use List[Component] in docs instead of spelling them all out
Rapptz Aug 20, 2025
8f83267
Move UnfurledMediaItem and MediaGalleryItem to interactions page
Rapptz Aug 20, 2025
27d69e9
Fix note in button decorator in action row
Sacul0457 Aug 20, 2025
59e28af
Fix Section.accessory being MISSING
Rapptz Aug 20, 2025
20f4bc4
Remove outdated comment
Rapptz Aug 20, 2025
d897027
Create .git-blame-ignore-revs
Sachaa-Thanasius Aug 20, 2025
b2aab86
Add typing-extensions to lint workflow
diceroll123 Aug 20, 2025
0309aac
Add a swap method for dynamic item's dispatching
DA-344 Aug 20, 2025
9bda89b
Update total count tracking to always consider the wrapper object
Rapptz Aug 22, 2025
0b7d30b
Fallback to None for AuditLogAction.category
Rapptz Aug 22, 2025
de09031
Allow TextDisplay as a top-level component in modals
Rapptz Aug 22, 2025
6d50130
Flip if statement for wrapped ActionRow components in modals
Rapptz Aug 22, 2025
d00ac62
Remove uses of deprecated Logger.warn method
Rapptz Aug 22, 2025
ab6efd0
[tasks] Log handled exceptions before sleeping
Rapptz Aug 22, 2025
fe7ce98
Add second generic parameter for view for DynamicItem
Rapptz Aug 24, 2025
bb45e05
Change Modal inheritance to BaseView instead of View
Rapptz Aug 24, 2025
753db17
Add changelog for v2.6.1
Rapptz Aug 24, 2025
9677dad
Fix Modal not raising when hitting the 5 item limit
Rapptz Aug 24, 2025
63357e0
Revert "Add second generic parameter for view for DynamicItem"
Rapptz Aug 24, 2025
50b0d21
Add missing versionadded to some BaseView items
lmaotrigine Aug 24, 2025
91281f2
Add Set Voice Channel Status permission
Jackenmen Aug 24, 2025
d5946d1
Fix bounds for TextInput and Label generic
Rapptz Aug 25, 2025
69f06c9
Fix Select.required not being applied
z03h Aug 26, 2025
cbff6dd
Add support for user collectibles
Soheab Aug 26, 2025
7c52dbd
Fix spelling mistake in LabelComponent slots
Sacul0457 Aug 26, 2025
116107d
Add accessory to Section.__repr__
Rapptz Aug 26, 2025
2f1f5fe
Revert "Fix context install decorators to correctly restrict commands"
Rapptz Aug 27, 2025
89d5cbd
Move v2 item check from BaseView to View
Rapptz Aug 31, 2025
6c4f8c4
Add changelog for v2.6.2 and v2.6.3
Rapptz Aug 28, 2025
25a4dbe
Remove id from LabelComponent.__repr__
Rapptz Aug 31, 2025
1e165ee
Update docs for on_user_update to mention primary_guild
blord0 Sep 2, 2025
44956db
Update modal example in docstring
Sacul0457 Sep 2, 2025
3f47698
All __all__ to primary_guilds module
diceroll123 Sep 3, 2025
a7f3494
Upgrade code by using f-strings and yield from
Luc1412 Sep 3, 2025
fe4bf87
Add channel attribute to automod quarantine user AuditLogAction
Sacul0457 Sep 3, 2025
bd329b1
Add support for emoji_added message type
diceroll123 Sep 3, 2025
a2a2281
Fix various TypeDicts for Unpack
Soheab Sep 28, 2025
b837d94
Add silent parameter to ForumChannel.create_thread
martinbndr Sep 28, 2025
a2a00ae
Fix unordered list rendering for several AuditLogAction entries
AbstractUmbra Sep 28, 2025
6ad5541
Add missing InviteType and ReactionType exports
LeviPesin Sep 28, 2025
46300df
Add missing reason kwarg in delete_invite
Sacul0457 Sep 28, 2025
c050ed0
Support new fields in Modify Current Member
Sacul0457 Sep 28, 2025
78ff166
Fix certain component IDs not being able to be settable afterwards
Rapptz Sep 28, 2025
830858c
Add MessageType.is_deletable to fix Messageable.purge failing
Rapptz Sep 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Replace Black with Ruff, then format whole project.
44a44e938fb2bd0bb085d8aa4577abeb01653ad3
6 changes: 3 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Install dependencies
id: install-deps
run: |
python -m pip install --upgrade pip setuptools wheel black==22.6 requests
python -m pip install --upgrade pip setuptools wheel ruff==0.12 requests "typing_extensions>=4.3,<5"
pip install -U -r requirements.txt

- name: Setup node.js
Expand All @@ -42,7 +42,7 @@ jobs:
warnings: false
no-comments: ${{ matrix.python-version != '3.x' }}

- name: Run black
- name: Run ruff
if: ${{ always() && steps.install-deps.outcome == 'success' }}
run: |
black --check discord examples
ruff format --check discord examples
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
include README.rst
include LICENSE
include requirements.txt
include discord/bin/*.dll
include discord/bin/*
include discord/py.typed
9 changes: 6 additions & 3 deletions discord/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
__author__ = 'Rapptz'
__license__ = 'MIT'
__copyright__ = 'Copyright 2015-present Rapptz'
__version__ = '2.6.0a'
__version__ = '2.7.0a'

__path__ = __import__('pkgutil').extend_path(__path__, __name__)

Expand Down Expand Up @@ -73,17 +73,20 @@
from .soundboard import *
from .subscription import *
from .presences import *
from .primary_guild import *
from .onboarding import *
from .collectible import *


class VersionInfo(NamedTuple):
major: int
minor: int
micro: int
releaselevel: Literal["alpha", "beta", "candidate", "final"]
releaselevel: Literal['alpha', 'beta', 'candidate', 'final']
serial: int


version_info: VersionInfo = VersionInfo(major=2, minor=6, micro=0, releaselevel='alpha', serial=0)
version_info: VersionInfo = VersionInfo(major=2, minor=7, micro=0, releaselevel='alpha', serial=0)

logging.getLogger(__name__).addHandler(logging.NullHandler())

Expand Down
4 changes: 2 additions & 2 deletions discord/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ async def setup(bot):
await bot.add_cog({name}(bot))
'''

_cog_extras = '''
_cog_extras = """
async def cog_load(self):
# loading logic goes here
pass
Expand Down Expand Up @@ -170,7 +170,7 @@ async def cog_after_invoke(self, ctx):
# called after a command is called here
pass

'''
"""


# certain file names and directory names are forbidden
Expand Down
Loading