Commit Graph

2729 Commits

Author SHA1 Message Date
Rapptz
263f45d05b Fix View.wait not returning when it times out
This also makes it so it returns the reason why the wait finished.
2021-05-28 00:53:28 -04:00
Rapptz
3f60997630 Add a timeout callback for detecting when a View times out 2021-05-28 00:53:28 -04:00
Rapptz
97f308d219 Add View.remove_item and View.clear_items 2021-05-28 00:53:28 -04:00
Rapptz
3453992ce6 Add View.interaction_check for interaction pre-conditions 2021-05-28 00:53:28 -04:00
Tyler
6c8f1ccbdf Add Role.is_assignable() 2021-05-28 00:53:23 -04:00
Rapptz
65db814d4a Add a way to wait for a view to finish its interactions 2021-05-27 23:31:48 -04:00
Zomatree
6cc3e572ba Button labels can be None 2021-05-27 22:33:13 -04:00
Michael H
1bf782fcb5 Add Member.get_role
Adds an efficient way to check if a member has a role by ID.

 This is done in a way consistent with the existing user API of the
 library.

 The more debated Member.has_role_id/has_role is intentionally not
 included for review at this time given the heavy bikeshedding of it.
2021-05-27 22:31:49 -04:00
Rapptz
1954861668 Add warning for comparing with role positioning 2021-05-27 21:11:17 -04:00
Rapptz
fc64ffdabd Allow passing multiple embeds in InteractionResponse.edit_message 2021-05-27 21:07:28 -04:00
Rapptz
fbafe20e51 Allow View to be instantiated without subclassing 2021-05-27 01:41:18 -04:00
Rapptz
c89882441c Fix typings for resolved channels in slash commands 2021-05-27 00:53:14 -04:00
Rapptz
7584834dd4 Only automatically defer if no response was given in callback 2021-05-27 00:53:14 -04:00
Rapptz
3b83f60b35 Add support for setting interaction responses 2021-05-27 00:53:14 -04:00
Rapptz
85758a75b3 Add interaction related endpoints to async webhook 2021-05-27 00:53:14 -04:00
Rapptz
d42c63e186 Fix some type hints in interactions 2021-05-27 00:53:14 -04:00
AXVin
2ad2cab50c [Interactions] Create User only when in DMs 2021-05-27 00:53:14 -04:00
Rapptz
5e96ad9261 Force button style to link if a URL is passed 2021-05-27 00:53:14 -04:00
Rapptz
80fd222ca0 Add aliases for button style colours 2021-05-27 00:53:14 -04:00
Rapptz
eda6680377 Rename enums to use official API naming 2021-05-27 00:53:14 -04:00
Rapptz
cc800796a2 Properly guard for DMs in interaction creation
Fix #6794
2021-05-27 00:53:14 -04:00
Rapptz
ed9badcddf Make Item and Button generic over the underlying view 2021-05-27 00:53:14 -04:00
Rapptz
4c0ebc9221 Change the way callbacks are defined to allow deriving
This should hopefully make these work more consistently as other
functions do.
2021-05-27 00:53:14 -04:00
Rapptz
cc56f31bcd Fix emoji not showing up in button component 2021-05-27 00:53:13 -04:00
Rapptz
98570793e4 Add initial support for buttons and components 2021-05-27 00:53:13 -04:00
Mikey
f42e922696 Fix bug in Embed.__len__ caused by footer without text 2021-05-27 00:45:35 -04:00
Rapptz
f56543df15 [commands] Remove function call indirection when checking author 2021-05-25 20:53:44 -04:00
Stanisław Jelnicki
67aabc3230 Remove VerificationLevel aliases 2021-05-25 20:51:08 -04:00
Tari
36cf3c94b4 [commands] Remove Bot.self_bot 2021-05-25 20:46:26 -04:00
numbermaniac
3b55573777 Fix minor typo in typing() docs 2021-05-25 02:23:14 -04:00
Imayhaveborkedit
ac061c31fb Fix default hook signature
Since the hook function can be both bound and unbound
the bound signature needs to accept an extra argument
2021-05-25 02:22:21 -04:00
Rapptz
3c90f16bf0 Fix cached_slot_property typings again 2021-05-23 21:30:44 -04:00
pikaninja
3cb093c709 Add a note about overwriting in set_permissions 2021-05-23 05:08:15 -04:00
Stanisław Jelnicki
65439732b3 Add Discord Certified Moderator user flag 2021-05-23 05:07:33 -04:00
apple502j
5acb3a62f8 Fix Webhook example 2021-05-23 03:42:37 -04:00
Imayhaveborkedit
8e08bd6af2 Add vws message hook 2021-05-23 03:42:07 -04:00
MrKomodoDragon
cc8a86a4bd Improve the example for abc.Messageable.typing 2021-05-23 03:37:55 -04:00
Cryptex
71fe40aafa Consistent loop attribute description 2021-05-23 03:36:20 -04:00
Tari
42bab370a7 [commands] Add BadColorArgument to __all__ 2021-05-16 15:40:06 -04:00
Rapptz
81b259ab36 Fix sending arrays with nulls in them when changing presences 2021-05-16 07:15:53 -04:00
chromacoat dreamkey
c896563af4 Fix Colour.fuchsia docstring typo 2021-05-15 20:00:35 -04:00
Dorukyum
5ad88dec72 Change Colour.blurple to new one
This moves the old one to Colour.og_blurple.
2021-05-15 02:13:12 -04:00
Josh
42a538edda [tasks] Replace None check with MISSING check in task loop 2021-05-15 02:10:00 -04:00
NextChai
ef6f5d947a [commands] Update command.parent and command.parents docs
* Switch root_parent from command to group
2021-05-15 02:09:37 -04:00
Alex Nørgaard
fb20c4c3d4 Update docs for (Partial)Message.publish to reflect the actual permissions needed 2021-05-15 02:08:16 -04:00
Arnav Jindal
ee3e2944ba Add Colour.fuchsia and Colour.yellow 2021-05-15 02:07:45 -04:00
Stanisław Jelnicki
9b4e820bbe Document Invite.inviter as optional 2021-05-12 20:34:44 -04:00
Josh
5fa64e83e0 Fix issues with imports causing NameErrors 2021-05-12 20:24:28 -04:00
Sebastian Law
124c4a3919 Add Template.url 2021-05-12 06:38:26 -04:00
Josh
ef22178dee [tasks] Type hint the tasks extension 2021-05-12 06:31:40 -04:00