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.
4 months ago
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.
4 months ago
Rapptz
ef1cb6a089
Prevent empty dictionaries from being added to the ViewStore
Fix #10405
4 months ago
Michael
38d5d8e47a
Use walk_children within remove_view
4 months ago
Soheab
e5263c0870
Add support for new modal components
4 months ago
Steve C
dae46f7d0f
Add generics to Interaction params
4 months ago
Rapptz
a7d42b9906
Fallback to Item.row when converting to Modal component list
Fix #10397
5 months ago
Rapptz
3ab09be13c
Invert View.is_finished condition when there is no associated Future
5 months ago
Michael
bcea13e993
Allow ui.View initialization without a running event loop
6 months ago
Rapptz
0052878983
Guard against Item.view being None when dispatching
7 months ago
Soheab
9580898c97
Detach view from item when removed
8 months ago
DA344
e2cf721e9c
Fix container items having out of date internal state
8 months ago
Sacul
8f2cb60700
Fix inaccurate total_children_count property in modals
8 months ago
Rapptz
88294fe352
Fix Section.accessory setter not updating view bindings
9 months ago
Rapptz
651699fcd2
Remove buggy and unintentional Container.children setter
9 months ago
Rapptz
8f90b7d534
Add shoutout to Button and Thumbnail accessories for Section
9 months ago
Soheab_
d78636283b
Correct supported types in docs for modal components
10 months ago
Soheab_
178ea664b2
Add missing required kwarg to all select classes
10 months ago
Soheab_
2d7e0614ad
Add support for File Upload component
10 months ago
Soheab_
944ffe93c7
Handle resolved data for modal components and types
10 months ago
Soheab_
1d3642d1fe
Fix KeyError on custom_id for modal components that don't support it
10 months ago
Rapptz
78ff16621a
Fix certain component IDs not being able to be settable afterwards
Fix #10305
9 months ago
Lucas Hardt
a7f349498a
Upgrade code by using f-strings and yield from
10 months ago
Sacul
44956db033
Update modal example in docstring
10 months ago
Rapptz
89d5cbd78a
Move v2 item check from BaseView to View
10 months ago
Rapptz
116107d7ed
Add accessory to Section.__repr__
10 months ago
Rapptz
d5946d1cbc
Fix bounds for TextInput and Label generic
Fix #10280
10 months ago
lmaotrigine
50b0d219b5
Add missing versionadded to some BaseView items
11 months ago
Rapptz
63357e0113
Revert "Add second generic parameter for view for DynamicItem"
This reverts commit fe7ce982f3 .
11 months ago
Rapptz
9677dada1f
Fix Modal not raising when hitting the 5 item limit
11 months ago
Rapptz
bb45e050b9
Change Modal inheritance to BaseView instead of View
11 months ago
Rapptz
fe7ce982f3
Add second generic parameter for view for DynamicItem
11 months ago
Rapptz
6d5013030b
Flip if statement for wrapped ActionRow components in modals
11 months ago
Rapptz
de09031899
Allow TextDisplay as a top-level component in modals
11 months ago
Rapptz
9bda89b0d6
Update total count tracking to always consider the wrapper object
11 months ago
DA344
0309aac335
Add a swap method for dynamic item's dispatching
11 months ago
Rapptz
20f4bc40ad
Remove outdated comment
11 months ago
Rapptz
59e28af19f
Fix Section.accessory being MISSING
11 months ago
Sacul
27d69e98e2
Fix note in button decorator in action row
11 months ago
DA344
24aa98b923
Fix Section.children and accessory's parent being None
11 months ago
Rapptz
9dbf13c2f9
Document Section.accessory as an attribute
11 months ago
Rapptz
44a44e938f
Reformat entire project with ruff instead of black
11 months ago
Rapptz
3ef6272e07
Fix error with View.from_message when having multiple items
11 months ago
Rapptz
d58c055c5b
Remove unused import
11 months ago
Rapptz
5d49f11709
Remove View.from_dict typing
11 months ago
Rapptz
fc12a41cdf
Run black
11 months ago
Rapptz
064cb7af71
Add View.total_children_count
11 months ago
Rapptz
f08c042217
Add content_length method to LayoutView and container items
11 months ago
Rapptz
6f6d990195
Fix type error with ItemCallbackType
11 months ago
Rapptz
4854c56d58
Allow discord.File in places where UnfurledMediaItem or str are allowed
11 months ago