100 Commits
Author SHA1 Message Date
Rapptz 5d74ed3e0c Bump PyNaCl version to allow 1.6.x version installs 2026-03-14 12:19:59 -04:00
Rapptz 14b2c1afd3 Don't cache SoundboardSound when Intents.expressions is disabled 2026-03-14 11:29:44 -04:00
Rapptz 026a882d52 Raise context menu command limit to 15 to match Discord 2026-03-03 20:42:56 -05:00
Rapptz 41e6639bbc Version bump for development 2026-03-03 13:41:03 -05:00
Rapptz dfd1144b22 Version bump to v2.7.1 2026-03-03 13:38:56 -05:00
Rapptz 64fcfe9333 Add changelog for v2.7.1 2026-03-03 13:35:17 -05:00
Rapptz 9cf04aec3c Add warning and raise if davey is not installed 2026-03-03 13:27:13 -05:00
Rapptz 92c715e388 Unpin strict davey dependency 2026-03-03 13:11:15 -05:00
Rapptz 2383467ccd Show davey version in --version output 2026-03-03 13:00:48 -05:00
Rapptz b01de35fa2 Remove old workaround to /callback not having a return type
The old code needed a workaround using interaction_id to differentiate
between multiple instances being reused since they would all go into
the `None` key. Since /callback now returns a proper message_id this
could be used as a key instead of None. From testing, it seems this is
true for both edit_message and send_message responses.
2026-03-02 12:29:02 -05:00
Rapptz 616137875b Fix memory leak with the view store when removing items
The previous code would maintain items in the dispatch mapping if
nested children were removed between calls because it would only
remove items that are live in the view at the point of removal. This
meant that calling something like ActionRow.clear_items() would keep
all the removed items within the mapping and would not be evicted.

This attempts to fix it by maintaining a cache state snapshot and
making a diff between the two versions to know which keys are now safe
to delete since they are no longer in the live view at all.
2026-03-02 11:33:51 -05:00
Rapptz 9798e5921a Version bump for development 2026-02-27 13:49:41 -05:00
Rapptz 5df6e2230a Version bump to v2.7.0 2026-02-27 13:49:19 -05:00
Rapptz 8c232c1cbd Add v2.7.0 changelog 2026-02-27 13:48:51 -05:00
Rapptz e55b308c1a Add AI contribution guideline 2026-02-26 01:33:25 -05:00
Rapptz 198549822e Close websocket when reconnecting websocket during polling
Close #10409
2026-02-25 12:08:49 -05:00
Rapptz 79b709290c Add client parameter to PartialEmoji.from_str
Fix #10407
2026-02-24 09:47:10 -05:00
Rapptz ef1cb6a089 Prevent empty dictionaries from being added to the ViewStore
Fix #10405
2026-02-23 02:31:55 -05:00
Rapptz f780f04447 Update last_send when receiving a HEARTBEAT request 2026-02-22 16:59:18 -05:00
Rapptz 2f1c3fde7b Fix Message.call raising an attribute error when accessed
Fix #10404
2026-02-18 22:27:23 -05:00
Rapptz 103fe90d8b [commands] Fix decorator order mattering for hybrid commands 2026-02-05 09:18:07 -05:00
Rapptz a7d42b9906 Fallback to Item.row when converting to Modal component list
Fix #10397
2026-02-04 18:57:04 -05:00
Rapptz 3ab09be13c Invert View.is_finished condition when there is no associated Future 2026-01-28 16:58:55 -05:00
Rapptz b9b21ca270 [commands] Fix Context.from_interaction derived Message.type
The previous Message.type when accessed from Context would be an
unknown enum type because the enum was double nested when the proper
type expected by the synthetic payload was an int not an enum.

Fix #10382
2026-01-11 08:02:50 -05:00
Rapptz 1df81fea52 [commands] Mark Cog check special methods as MaybeCoro return
Fix #10354
2026-01-08 08:17:43 -05:00
Rapptz 0052878983 Guard against Item.view being None when dispatching 2025-12-21 12:18:05 -05:00
Rapptz c342db8534 [commands] Fix flag annotations in 3.14 using annotationlib
Fix #10349
2025-11-12 20:22:45 -05:00
Rapptz ab8195bbd3 Add support for role member counts 2025-10-16 02:23:49 -04:00
Rapptz c58b973c7e Add animated=true parameter to animated emoji 2025-10-14 17:33:49 -04:00
Rapptz 9c327df45a Use webp as the default emoji URL format
Fix #10331
2025-10-14 17:20:32 -04:00
Rapptz 6d19bc763c [commands] Fix flag annotations not working under 3.14 2025-10-14 17:16:43 -04:00
Rapptz be3e332251 Add v2.6.4 changelog 2025-10-08 17:41:50 -04:00
Rapptz e2b6fa8370 Use obj reference target instead of data for typing objects 2025-10-08 17:31:24 -04:00
Rapptz 88294fe352 Fix Section.accessory setter not updating view bindings 2025-10-08 08:52:11 -04:00
Rapptz 651699fcd2 Remove buggy and unintentional Container.children setter 2025-10-05 02:45:23 -04:00
Rapptz 8f90b7d534 Add shoutout to Button and Thumbnail accessories for Section 2025-09-28 16:07:30 -04:00
Rapptz 830858cde8 Add MessageType.is_deletable to fix Messageable.purge failing
Fix #10319
2025-09-28 13:17:54 -04:00
Rapptz 78ff16621a Fix certain component IDs not being able to be settable afterwards
Fix #10305
2025-09-28 13:05:23 -04:00
Rapptz 25a4dbe86a Remove id from LabelComponent.__repr__ 2025-08-31 16:00:59 -04:00
Rapptz 6c4f8c410d Add changelog for v2.6.2 and v2.6.3 2025-08-31 15:14:54 -04:00
Rapptz 89d5cbd78a Move v2 item check from BaseView to View 2025-08-31 14:18:50 -04:00
Rapptz 2f1f5fe2e2 Revert "Fix context install decorators to correctly restrict commands"
This reverts commit ce9f5ad1ba.
2025-08-26 21:12:03 -04:00
Rapptz 116107d7ed Add accessory to Section.__repr__ 2025-08-26 11:54:18 -04:00
Rapptz d5946d1cbc Fix bounds for TextInput and Label generic
Fix #10280
2025-08-25 11:29:44 -04:00
Rapptz 63357e0113 Revert "Add second generic parameter for view for DynamicItem"
This reverts commit fe7ce982f3.
2025-08-24 13:21:54 -04:00
Rapptz 9677dada1f Fix Modal not raising when hitting the 5 item limit 2025-08-24 09:42:41 -04:00
Rapptz 753db1724b Add changelog for v2.6.1 2025-08-24 09:29:41 -04:00
Rapptz bb45e050b9 Change Modal inheritance to BaseView instead of View 2025-08-24 09:29:41 -04:00
Rapptz fe7ce982f3 Add second generic parameter for view for DynamicItem 2025-08-24 09:12:12 -04:00
Rapptz ab6efd02bc [tasks] Log handled exceptions before sleeping
Fix #10276
2025-08-22 19:59:56 -04:00
Rapptz d00ac622bc Remove uses of deprecated Logger.warn method 2025-08-22 19:52:12 -04:00
Rapptz 6d5013030b Flip if statement for wrapped ActionRow components in modals 2025-08-22 19:28:37 -04:00
Rapptz de09031899 Allow TextDisplay as a top-level component in modals 2025-08-22 19:18:33 -04:00
Rapptz 0b7d30bbe3 Fallback to None for AuditLogAction.category 2025-08-22 19:14:01 -04:00
Rapptz 9bda89b0d6 Update total count tracking to always consider the wrapper object 2025-08-21 22:20:12 -04:00
Rapptz 20f4bc40ad Remove outdated comment 2025-08-20 06:53:03 -04:00
Rapptz 59e28af19f Fix Section.accessory being MISSING 2025-08-20 06:50:23 -04:00
Rapptz 8f83267ce9 Move UnfurledMediaItem and MediaGalleryItem to interactions page 2025-08-19 21:09:09 -04:00
Rapptz 283ed20956 Use List[Component] in docs instead of spelling them all out 2025-08-19 20:55:02 -04:00
Rapptz 9dbf13c2f9 Document Section.accessory as an attribute 2025-08-19 04:25:29 -04:00
Rapptz a5a4bcf61b Update Permissions.manage_messages docstring 2025-08-19 04:09:21 -04:00
Rapptz ad48815926 Add Permissions.pin_messages 2025-08-19 04:04:09 -04:00
Rapptz 44a44e938f Reformat entire project with ruff instead of black 2025-08-18 20:16:10 -04:00
Rapptz 3ef6272e07 Fix error with View.from_message when having multiple items 2025-08-18 19:04:19 -04:00
Rapptz d58c055c5b Remove unused import 2025-08-18 15:07:44 -04:00
Rapptz 1bc330a48a Version bump for development 2025-08-18 15:07:05 -04:00
Rapptz 9845a53d3d Version bump to v2.6.0 2025-08-18 15:00:51 -04:00
Rapptz 714df2cfde Add changelog for v2.6 2025-08-18 15:00:51 -04:00
Rapptz 5d49f11709 Remove View.from_dict typing 2025-08-18 15:00:51 -04:00
Rapptz fc12a41cdf Run black 2025-08-18 14:49:32 -04:00
Rapptz 064cb7af71 Add View.total_children_count 2025-08-18 14:42:55 -04:00
Rapptz f08c042217 Add content_length method to LayoutView and container items 2025-08-18 14:33:15 -04:00
Rapptz e00bb0b0f3 Change info directive to note 2025-08-18 13:44:29 -04:00
Rapptz 13d1fbee58 Add more detail to what filenames are allowed in File.uri 2025-08-18 13:33:30 -04:00
Rapptz 76258d071a Add note for File.uri and ASCII only names 2025-08-18 13:27:18 -04:00
Rapptz 6f6d990195 Fix type error with ItemCallbackType 2025-08-18 07:13:50 -04:00
Rapptz 0c98251087 Move Locale.language_code documentation to where it belongs 2025-08-18 06:19:30 -04:00
Rapptz 4854c56d58 Allow discord.File in places where UnfurledMediaItem or str are allowed 2025-08-18 06:11:59 -04:00
Rapptz 98d2113cdd Hide interaction_check where it isn't really applicable 2025-08-18 05:05:05 -04:00
Rapptz 9ef5b054e5 Refactor total children count to an overrideable method 2025-08-18 04:49:20 -04:00
Rapptz 5887ce1430 Fix settings example not resetting option default state 2025-08-18 04:35:41 -04:00
Rapptz 2a69ac4ca8 Document difference between View and LayoutView 2025-08-18 04:34:24 -04:00
Rapptz eb84d0dfcb Add example showcasing ui.Label in modals 2025-08-17 20:02:21 -04:00
Rapptz 22d6e8d0aa Add example showcasing how to do a settings panel 2025-08-17 19:48:18 -04:00
Rapptz 4be15b5616 Add example showcasing Container for Embed-like layouts 2025-08-16 06:18:36 -04:00
Rapptz 24d3a12117 Remove unused row parameter from TextDisplay 2025-08-16 06:18:36 -04:00
Rapptz 4f539b710f Fix type errors in all examples 2025-08-16 06:18:36 -04:00
Rapptz 08ef967371 Typecheck when constructing MediaGalleryItem 2025-08-15 08:11:13 -04:00
Rapptz 38c6407ffd Maintain a reference to View dispatched tasks 2025-08-14 00:47:55 -04:00
Rapptz 3fb627d078 Add support for label components and select in modals 2025-08-14 00:47:55 -04:00
Rapptz 9fb74fd7a1 Remove unnecessary TypeGuard 2025-08-13 21:27:38 -04:00
Rapptz 8c1886799d Don't recreate ItemCallbackType 2025-08-13 21:13:17 -04:00
Rapptz ec409a0a7b Guard AppCommandThread.guild attribute access 2025-08-08 03:13:30 -04:00
Rapptz 460d188359 Version bump for development 2025-03-04 20:16:50 -05:00
Rapptz d2a6ccf715 Version bump to v2.5.2 2025-03-04 20:13:27 -05:00
Rapptz f4bce1caf0 Add changelog for v2.5.2 2025-03-04 20:12:54 -05:00
Rapptz 973bb5089f Version bump for development 2025-03-04 02:15:32 -05:00
Rapptz 73f261d536 Version bump to v2.5.1 2025-03-04 02:14:02 -05:00
Rapptz 6b0a6eea66 Add v2.5.1 changelog 2025-03-04 02:13:31 -05:00
Rapptz fbe2b358fc Add note about NotFound for Messageable.send
Fix #10116
2025-02-28 18:03:47 -05:00