842d6b4fbb
Fix auto_locale_strings when no choices are given
2022-08-06 09:20:00 -04:00
87c9c95bb8
Use persistent dictionary for ratelimit information
...
This should prevent ratelimit information from being cleared too early.
In order to prevent the dictionary from growing to large expired keys
are deleted once they've been deleted.
At present I'm unsure if this change would cause too much CPU pressure.
2022-08-05 23:19:16 -04:00
7d20379bd9
Add name_localizations and description_localizations to AppCommand & co
2022-08-05 22:36:40 -04:00
1c9792e0ed
Add auto_locale_strings parameter to application commands
2022-08-05 22:36:40 -04:00
2d586ae805
Add initial support for app command localisation
2022-08-05 22:35:30 -04:00
eb3bc7102b
[commands] Ensure Command.extras are copied
...
Fix #8309
2022-08-05 21:56:51 -04:00
d707019348
Bump Pyright to 1.1.265, fix type errors, and remove unnecessary ignores
2022-08-04 22:46:02 -04:00
60079aee1b
[commands] Fix Annotated not working with FlagConverter
2022-08-04 10:44:03 -04:00
08fa9aa65c
Add support for inline transformers via classmethod
2022-08-04 10:28:57 -04:00
6c42065210
Fix various a -> an typos across the library
...
Closes #8301 , #8287
2022-08-04 08:17:07 -04:00
c4e09acff8
Add InteractionResponse.type property
2022-08-04 08:13:27 -04:00
ca1365d7ef
Set allow_list for fetched AutoModRules
2022-08-03 20:23:58 -04:00
c735682ac6
Fix autocomplete bindings not working for transformer instances
2022-08-03 19:02:36 -04:00
5538cd501c
Document relationship between AutoModRuleAction and its type
2022-08-03 03:13:00 -04:00
2fb309a463
[commands] Fix typing error with CheckAnyFailure
2022-08-03 03:11:12 -04:00
c604f853ea
Allow creation of allow lists in automod word filter rules
2022-08-03 03:10:36 -04:00
13c725f183
Fix EnumNameTransformer passing values
2022-08-02 11:02:30 -04:00
07ad6951fb
Fix various generics throughout the public interface
...
Fix CooldownMapping generic typing and ensure other public methods
have proper generics
2022-08-01 06:24:55 -04:00
6e3c359373
Add min/max_length to Argument
...
Co-authored-by: Danny <1695103+Rapptz@users.noreply.github.com >
2022-08-01 06:23:12 -04:00
f5b0717661
[commands] Add get_app_commands and walk_app_commands to Cog
2022-08-01 06:22:02 -04:00
c26473d0eb
Fix views not being persistent if modifying custom_id after __init__
2022-07-31 04:53:25 -04:00
5527de688a
Fix Python 3.10 __or__ not working with transformers
...
Fixes #8214
2022-07-30 04:48:26 -04:00
11618cd1ba
Refactor transformers to use instances instead of classmethods
...
This should allow them to be easier to use for users without requiring
a lot of metaprogramming hackery if you want to involve state.
2022-07-30 04:40:28 -04:00
cbf02eda0c
Fix bolded HTTPException not working due to rST limitation
2022-07-29 21:58:32 -04:00
c43d302a28
[commands] Only call hybrid after_invoke hooks if the command is called
...
Fix #8276
2022-07-29 21:39:23 -04:00
dc8cbc073e
Fix small typo in Guild.edit docstring
2022-07-27 22:28:54 -04:00
1fbcfbd1fb
Fix cog_app_command_error for group edge case
2022-07-27 22:27:37 -04:00
6d1069e789
Fix cog_app_command_error for groups
2022-07-27 00:29:53 -04:00
b80cb47caf
Implement Embed.__eq__ and EmbedProxy.__eq__
2022-07-27 00:28:10 -04:00
9f1c511b47
Fix Guild.afk_channel and VoiceState.channel being None at startup
2022-07-26 09:38:36 -04:00
24b619a516
Fix docstring for AppCommand.options and AppCommandGroup.options
2022-07-25 21:20:08 -04:00
3ee18e4c5d
Use a TypeVar for flatten_user to workaround Pyright bug
2022-07-25 21:18:52 -04:00
fb8d5c15d0
Add cog_app_command_error to python -m newcog
2022-07-24 20:30:04 -04:00
efdda635fb
Fix View.from_message not respecting ActionRow row order
2022-07-23 15:24:26 -04:00
9d9d96fce1
Fix crash with automod due to silent Discord breaking change
...
Fix #8264
2022-07-23 15:14:45 -04:00
b68568f375
[commands] Fix type annotations to use Union instead of |
2022-07-23 15:11:19 -04:00
311891912e
[commands] Change cooldowns to take context instead of message
2022-07-23 07:08:44 -04:00
406495b465
Use a sequence instead of a list for AllowedMentions
2022-07-23 01:26:59 -04:00
dc50736bfc
Add ApplicationFlags.app_commands_badge
2022-07-21 15:00:40 -04:00
d52bc5d225
Cache voice members on start up if MemberCacheFlags.voice is enabled
...
Fix #8209
2022-07-20 23:12:36 -04:00
0b1c5df3e0
Fix minimum and maximum being casted to str in Range[str, ...]
2022-07-20 23:12:00 -04:00
9c109ae59b
[commands] Unload cog when command registration fails in _inject
2022-07-20 22:31:14 -04:00
87bc79e6e3
Change certain sequences to use a special proxy type instead of list
...
This is to speed up cases where someone is just querying the length
of the underlying sequence. If anything else is done to the sequence
then it is copied from the original iterator.
This change should be mostly transparent.
2022-07-19 01:58:58 -04:00
98c4f2ae8b
Fix utils.copy_doc being partially unknown
2022-07-19 01:36:18 -04:00
a01dad283f
Add extraneous debug logging to sub ratelimits being detected
2022-07-19 01:36:18 -04:00
76402b00f9
Allow configuring the maximum ratelimit timeout before erroring
...
This is useful for cases where a rate limit is known to be
extraordinarily high, but you still want to handle the error.
This is common with routes such as emoji creation.
2022-07-19 01:36:18 -04:00
85ea418776
Special case message deletion sub rate limits
2022-07-19 00:07:28 -04:00
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
4914e74029
Change variable name for binding error handler to be more generic
2022-07-17 23:46:47 -04:00
0546343bcb
[commands] Add cog-level app command error special method
2022-07-17 23:45:19 -04:00