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
Steve C
dae46f7d0f
Add generics to Interaction params
4 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
Soheab_
944ffe93c7
Handle resolved data for modal components and types
10 months ago
Rapptz
89d5cbd78a
Move v2 item check from BaseView to View
10 months ago
lmaotrigine
50b0d219b5
Add missing versionadded to some BaseView items
10 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
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
9ef5b054e5
Refactor total children count to an overrideable method
11 months ago
Rapptz
2a69ac4ca8
Document difference between View and LayoutView
11 months ago
Rapptz
38c6407ffd
Maintain a reference to View dispatched tasks
11 months ago
Rapptz
3fb627d078
Add support for label components and select in modals
11 months ago
Rapptz
9fb74fd7a1
Remove unnecessary TypeGuard
11 months ago
DA344
50caa3c82c
Add support for components V2
Co-authored-by: Michael H <[email protected] >
Co-authored-by: Soheab <[email protected] >
Co-authored-by: owocado <[email protected] >
Co-authored-by: Jay3332 <[email protected] >
Co-authored-by: Danny <[email protected] >
11 months ago
Leonardo
7f16a06479
Copy Select options when creating View class
1 year ago
Rapptz
8953938a53
Update Pyright to v1.1.394
1 year ago
DA344
6ab747f9e5
Add support for sending views in stateless webhooks
1 year ago
Soheab
2248fc1946
Fix various code around Message.interaction(_metadata)
2 years ago
ナニカ
dc6d33c303
copy over original row position for dynamic items
2 years ago
Rapptz
76666fbcf4
Properly check for maximum number of children
2 years ago
Rapptz
078b500657
Fix dynamic item views having a timeout causing it to evict
3 years ago
Soheab_
698363e76b
Refactor from_components for Select classes
Co-authored-by: Danny <[email protected] >
3 years ago
z03h
e67d00502d
Fix View.from_message not creating other Selects
3 years ago
Rapptz
94655cd804
Skip adding views to the synced message store if fully dynamic
3 years ago
Rapptz
f793af0456
Add item parameter to DynamicItem.from_custom_id
3 years ago
Rapptz
7c3868ef3b
Add Client.remove_dynamic_items
3 years ago
Rapptz
a852f90358
Add support for dynamic items that parse custom_id for state
3 years ago
Takagi Tasuku
f7e9795495
Call super for __init_subclass__ in View
Co-authored-by: Danny <[email protected] >
3 years ago
Rapptz
6cb9a84898
Fix views not being removed from message store backing
This uses the original interaction ID if available for cache eviction
3 years ago
Trevor
5009c83bc9
Implement New Select Types
Co-authored-by: Soheab_ <[email protected] >
Co-authored-by: rdrescher909 <[email protected] >
Co-authored-by: Danny <[email protected] >
4 years ago
ster
95b6bd8782
Add coro tag to docstrings that were missing it
4 years ago
Ionite
6981eb69c4
Normalize type formatting in TypeError
Normalize most mixed usages of `__class__`, `__class__!r`,
`__class__.__name__!r` to the standard form of
`__class__.__name__`
4 years ago
Bryan Forbes
b12b4b18fd
Mark public callbacks as positional-only
4 years ago
Rapptz
6327402730
Update View timeout only if interaction_check passes
4 years ago
Mikey
9c38cf3aef
Fix ui.Select.values in modals
4 years ago
Rapptz
efdda635fb
Fix View.from_message not respecting ActionRow row order
4 years ago