3891 Commits

Author SHA1 Message Date
Rapptz
85ea418776 Special case message deletion sub rate limits 2022-07-19 00:07:28 -04:00
Rapptz
c17eb31328 Rewrite rate limit handling to use X-Ratelimit-Bucket and a semaphore
This should increase throughput of the number of requests that can be
made at once, while simultaneously following the new standard practice
of using the rate limit bucket header.

This is an accumulation of a lot of months of work between a few people
and it has been tested extensively. From the testing it seems to work
fine, but I'm not sure if it's the best way to do it.

This changeset does not currently take into consideration sub
rate limits yet, but the foundation is there via Route.metadata. In the
future, this metadata will be filled in with the known sub rate limit
implementation to allow them to have separate keys in the rate limit
mapping.

Co-authored-by: Josh <josh.ja.butt@gmail.com>
2022-07-19 00:07:28 -04:00
Rapptz
4914e74029 Change variable name for binding error handler to be more generic 2022-07-17 23:46:47 -04:00
Stocker
0546343bcb
[commands] Add cog-level app command error special method 2022-07-17 23:45:19 -04:00
Rapptz
2067819b75 Fix some minor typing errors 2022-07-17 21:40:05 -04:00
ow0x
52f3a3496b
Update docs for abc.Messageable.pins() 2022-07-17 01:07:33 -04:00
z03h
faad035fa2
[commands] change Range to raise BadArgument for invalid values 2022-07-16 22:27:47 -04:00
Harshal Laheri
20d3871290
Add return type hint for some functions 2022-07-15 00:15:42 -04:00
Lilly Rose Berner
e0341c9ef2
Add forum post rename system message 2022-07-11 06:05:07 -04:00
GoogleGenius
eea70b53cd
Fix small typos in docstrings 2022-07-11 00:05:09 -04:00
z03h
1aaa32d4bc
Add on_raw_app_command_permissions_update event 2022-07-10 04:00:26 -04:00
Lucas Hardt
55b9a848ff
Implement AppCommand mentions 2022-07-09 23:06:09 -04:00
James Hilton-Balfe
3433e13848
Prioritise async iteration before sync iteration in utils.find/get 2022-07-07 19:30:21 -04:00
z03h
04aeff660b
Add automod types to audit log 2022-07-07 19:30:03 -04:00
I. Ahmad
b88bdaf4c0
Add Intents.auto_moderation 2022-07-06 05:56:58 -04:00
Rapptz
b917904c1b Prevent launching shards when bot is closed
Fix #8210
2022-07-06 05:54:18 -04:00
zephyrkul
9fe19dcc69
[commands] Add Context.permissions and Context.bot_permissions 2022-07-04 21:48:36 -04:00
JohannesIBK
65a270d35a
Update bot_has_permissions to use Interaction.app_permissions 2022-07-04 21:47:47 -04:00
Rapptz
5de9287902 Change abc.PrivateChannel to be a proper subclass
This fixes isinstance(thread, discord.abc.PrivateChannel) from
returning True
2022-07-04 05:48:02 -04:00
Rapptz
fd9c244f48 Validate Range to disallow min > max 2022-07-03 07:37:58 -04:00
Emily
c61e407b50
Fix typo in app_commands.AppCommandGroup 2022-07-01 22:31:54 -04:00
Rapptz
482e3ead9b Improve documentation on AutoModAction.message_id 2022-07-01 20:12:07 -04:00
Rapptz
53a111872e Fix ArrayFlags._from_value not having an initial value 2022-07-01 20:10:42 -04:00
CoolSpring8
b806ce332e
Fix passing proxy to interactions and webhooks 2022-07-01 19:27:42 -04:00
Rapptz
b5392ea0f1 [commands] Add support for Range[str, ...] 2022-07-01 19:21:56 -04:00
Rapptz
bac66a9dab Add support for Range[str, ...] for app commands 2022-07-01 19:04:59 -04:00
Rapptz
b3a24846bd Add Interaction.app_permissions
Fix #8193
2022-06-29 22:38:04 -04:00
z03h
3b5cd3b92c
Fix audit log for multiple app command permission updates 2022-06-29 22:20:23 -04:00
Simon Beal
66dbed29b7
Add support for harmful_link automod triggers
Co-authored-by: Blue <blue@nqn.blue>
2022-06-29 21:52:22 -04:00
Bryan Forbes
b7dd97dca9
[commands] Change Command.extras to match typing in app commands 2022-06-28 16:20:15 -04:00
Bryan Forbes
0eb3d26343
Add generic arguments for extras typing 2022-06-27 22:35:22 -04:00
apple502j
b95db674c0
Fix some typos 2022-06-27 22:34:45 -04:00
Emily
55849d996e
Update documentation for discord.Message
Co-authored-by: Danny <1695103+Rapptz@users.noreply.github.com>
2022-06-27 00:48:36 -04:00
Alex Nørgaard
5426d19dc7
Implement AutoMod 2022-06-27 00:47:52 -04:00
Rapptz
7ad00750c6 Add note about different client subclasses 2022-06-25 07:51:21 -04:00
Rapptz
1335937288 Add Thread.starter_message property 2022-06-23 04:17:56 -04:00
mniip
1be36c9c3e
Change View, Modal, and AudioPlayer to use logger instead of stderr 2022-06-22 02:10:02 -04:00
I. Ahmad
9fc4769b18
Add extras attribute to app commands command types 2022-06-21 20:38:56 -04:00
Rapptz
b8ddb17b14 Fix fallback_to_global not working with context menus
Fix #8167
2022-06-20 06:20:46 -04:00
will
d0a52f4276
Fix typo and capitalizations in docs 2022-06-19 23:02:53 -04:00
Rapptz
922e52b6df Update IDENTIFY payload to match new format 2022-06-17 20:56:44 -04:00
Rapptz
1a90327202 Fix potential infinite loop in Reaction.users 2022-06-16 18:56:42 -04:00
Nadir Chowdhury
85495a910c
Add extra details to rate limit logs
- Include the rate limit bucket for webhooks
- Enable `stack_info` for the 429 warning.
2022-06-16 18:52:37 -04:00
Rapptz
9648986028 Reorder fruit autocomplete example to be less confusing 2022-06-14 20:40:27 -04:00
Rapptz
7e66e11640 Change Message.system_content to always return str 2022-06-14 20:38:39 -04:00
Rapptz
903e2e64e9 [tasks] Only update the time interval if the body has run once
Fix #8151
2022-06-14 07:41:36 -04:00
Sarthak Upadhyay
1ba290d8c6
Update sticker limit in _PREMIUM_GUILD_LIMITS 2022-06-14 00:37:58 -04:00
Alex Nørgaard
2b9e43dbf9
Change Message.application type to MessageApplication
Co-authored-by: Danny <1695103+Rapptz@users.noreply.github.com>
2022-06-13 16:34:41 -04:00
Rapptz
96e6261d61 Change default for purge oldest_first to match history 2022-06-13 04:54:08 -04:00
Rapptz
c232631504 Refactor utils.oauth_url slightly 2022-06-13 04:49:32 -04:00