Rapptz
934ab4151a
Mark state refresh methods as private with an underscore
People kept wondering what it is or what it does.
3 years ago
Stocker
5aa696ccfa
Fix typing issues and improve typing completeness across the library
Co-authored-by: Danny <[email protected] >
Co-authored-by: Josh <[email protected] >
3 years ago
Rapptz
c0890bfbc1
Remove unused View._expires_at private function
3 years ago
Han Seung Min - 한승민
93af158b0c
Refactor loop code to allow usage of asyncio.run
3 years ago
Stella
2b600241a4
Fix Modal.stop sometimes not removing from the store
3 years ago
Rapptz
4c8b1f9abd
Remove unused imports
3 years ago
Josh
d409ddd227
Alter return-type of button/select decorators
3 years ago
Rapptz
88b520b5ab
Reformat code using black
Segments where readability was hampered were fixed by appropriate
format skipping directives. New code should hopefully be black
compatible. The moment they remove the -S option is probably the moment
I stop using black though.
3 years ago
Josh
19c6687b55
Add support for Modal Interactions
3 years ago
Rapptz
c22f058fa0
Fix views not being removed upon timeout
3 years ago
Rapptz
0cc67e58ed
Fallback to None message_id searches in View dispatch
Not all persistent views have an associated message_id attached to
them.
Fix #7319
4 years ago
Rapptz
b87d306a70
Remove unused variable in view
4 years ago
Rapptz
e795d341e7
Change View dispatch mechanism to be keyed by message_id as well
If different persistent view instances are used within different
message_ids their callbacks will get called without differentiating
between them, leading to potential issues such as 404 errors. This
change makes it so N views with custom IDs bound to N message_ids
will no longer conflict with one another.
4 years ago
scrazzz
a0e5e062c9
Add versionadded to ui.View and ui.Item
4 years ago
Kaylynn Morgan
feed302269
Fix documentation note for interaction_check
4 years ago
Rapptz
8df35c83a9
Remove extraneous dict assignment from view store
4 years ago
Rapptz
074f34a5fa
Specify View timeouts is in seconds
4 years ago
Rapptz
d7ed884593
Rework view timeouts to work as documented
4 years ago
Josh
d001b9d0ee
[docs] Fix more references
Co-Authored-By: Riley Shaw <[email protected] >
4 years ago
Rapptz
c1f1c67eed
Change timeout parameter in View.from_message to keyword only
4 years ago
Rapptz
d8075d5412
Add View.from_message to convert message components to a View
4 years ago
Rapptz
157caaec7c
Add conversion routine for SelectMenu to ui.Select
4 years ago
Rapptz
04573c3c06
Make View timeout parameter keyword-only
4 years ago
UP929312
4724943861
Grammatical improvements in View documentation
4 years ago
Rapptz
81e9d70b7b
Add pre-conditions to avoid on_timeout being called after stop()
Apparently the cancellation request for a TimerHandle doesn't
necessarily have to be honoured despite large periods of time passing
4 years ago
Rapptz
876b1e0f3e
Add View.on_error callback for swallowed exceptions
4 years ago
Rapptz
dbd9ed2c41
Add View.is_dispatching to detect whether a view has been added
4 years ago
Rapptz
78275023cc
Add Client.persistent_views to get all persistent views
4 years ago
Rapptz
7c40e83d10
Ensure views added to Client.add_view are persistent views
4 years ago
Rapptz
d0097c4281
Remove view syncing before editing in views
This prevents a potential race condition when a MESSAGE_UPDATE is
received syncing and refreshing the view components causing a desync.
4 years ago
Rapptz
2ed3e049e1
Add View.is_finished() to query listening state
4 years ago
Rapptz
90a28d48d5
Fix potential KeyError when removing views
4 years ago
Rapptz
c9cdb47338
Add __repr__ for View
4 years ago
Rapptz
7bd1211b36
Rework item grouping behaviour to take into consideration weights
This also renames `group` into `row`
4 years ago
Rapptz
c21d12be5e
Check future state before setting result in View
4 years ago
Rapptz
f4fe247813
Remove __slots__ from View
4 years ago
Rapptz
ef9f61a933
Add support for select components
4 years ago
Rapptz
263f45d05b
Fix View.wait not returning when it times out
This also makes it so it returns the reason why the wait finished.
4 years ago
Rapptz
3f60997630
Add a timeout callback for detecting when a View times out
4 years ago
Rapptz
97f308d219
Add View.remove_item and View.clear_items
4 years ago
Rapptz
3453992ce6
Add View.interaction_check for interaction pre-conditions
4 years ago
Rapptz
65db814d4a
Add a way to wait for a view to finish its interactions
4 years ago
Rapptz
fbafe20e51
Allow View to be instantiated without subclassing
4 years ago
Rapptz
7584834dd4
Only automatically defer if no response was given in callback
4 years ago
Rapptz
eda6680377
Rename enums to use official API naming
4 years ago
Rapptz
4c0ebc9221
Change the way callbacks are defined to allow deriving
This should hopefully make these work more consistently as other
functions do.
4 years ago
Rapptz
98570793e4
Add initial support for buttons and components
4 years ago