Rapptz
df54da8bc9
Fix secret example requiring more intents than necessary
2022-08-09 10:42:15 -04:00
Rapptz
c32567ea81
Refactor TranslationContext to be more useful
...
The previous enum was good at accomplishing dynamic key generation for
a few cases, but it fell short in others:
1. It could not discern group names and command names
2. It could not give you more contextual data such as the full object
currently being translated.
On top of that, the context being a required parameter for
Translator.translate meant that it wouldn't be possible to re-use the
translator for other use cases outside of the rigid ones defined in the
library.
To alleviate these concerns, new enum attributes were added along with
a richer type for obtaining even more context.
2022-08-09 10:41:45 -04:00
Rapptz
57efb5a5a0
Fix failing tests to use new get_parameter function
2022-08-09 08:02:41 -04:00
Rapptz
1727eca106
Add app_commands.Parameter for parameter introspection
2022-08-09 07:43:40 -04:00
Rapptz
0e386ec2cc
Fix parameter descriptions being serialised as locale_str
2022-08-08 21:15:08 -04:00
Rapptz
cc0c261925
Change auto_locale_strings default to True
2022-08-08 20:17:47 -04:00
Rapptz
7e3b08871b
Fix documentation build failure from previous rename
2022-08-08 08:30:54 -04:00
Rapptz
dd40ff1d57
Add __slots__ to locale_str
2022-08-08 08:11:19 -04:00
Rapptz
9ce1541775
Rename Interaction.original_message to original_response
2022-08-08 08:11:19 -04:00
Rapptz
6381b5a8f4
Change abc.GuildChannel.overwrites to have Object keys if cache failed
...
Ultimately despite it not being the prettiest, Object keys ended up
being the sanest solution to this without destroying ergonomics.
2022-08-06 14:46:52 -04:00
Rapptz
1a361f4519
Document Text in Voice in the migrating documentation
...
Closes #8179 #8064
2022-08-06 14:24:15 -04:00
Rapptz
842d6b4fbb
Fix auto_locale_strings when no choices are given
2022-08-06 09:20:00 -04:00
Rapptz
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
Rapptz
7d20379bd9
Add name_localizations and description_localizations to AppCommand & co
2022-08-05 22:36:40 -04:00
Rapptz
1c9792e0ed
Add auto_locale_strings parameter to application commands
2022-08-05 22:36:40 -04:00
Rapptz
2d586ae805
Add initial support for app command localisation
2022-08-05 22:35:30 -04:00
Rapptz
eb3bc7102b
[commands] Ensure Command.extras are copied
...
Fix #8309
2022-08-05 21:56:51 -04:00
Rapptz
60079aee1b
[commands] Fix Annotated not working with FlagConverter
2022-08-04 10:44:03 -04:00
Rapptz
08fa9aa65c
Add support for inline transformers via classmethod
2022-08-04 10:28:57 -04:00
Rapptz
6c42065210
Fix various a -> an typos across the library
...
Closes #8301 , #8287
2022-08-04 08:17:07 -04:00
Rapptz
99d2ecac54
Fix and add tests for new autocomplete regression
2022-08-03 20:21:13 -04:00
Rapptz
c735682ac6
Fix autocomplete bindings not working for transformer instances
2022-08-03 19:02:36 -04:00
Rapptz
13c725f183
Fix EnumNameTransformer passing values
2022-08-02 11:02:30 -04:00
Rapptz
5527de688a
Fix Python 3.10 __or__ not working with transformers
...
Fixes #8214
2022-07-30 04:48:26 -04:00
Rapptz
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
Rapptz
cbf02eda0c
Fix bolded HTTPException not working due to rST limitation
2022-07-29 21:58:32 -04:00
Rapptz
c43d302a28
[commands] Only call hybrid after_invoke hooks if the command is called
...
Fix #8276
2022-07-29 21:39:23 -04:00
Rapptz
efdda635fb
Fix View.from_message not respecting ActionRow row order
2022-07-23 15:24:26 -04:00
Rapptz
9d9d96fce1
Fix crash with automod due to silent Discord breaking change
...
Fix #8264
2022-07-23 15:14:45 -04:00
Rapptz
b68568f375
[commands] Fix type annotations to use Union instead of |
2022-07-23 15:11:19 -04:00
Rapptz
406495b465
Use a sequence instead of a list for AllowedMentions
2022-07-23 01:26:59 -04:00
Rapptz
dc50736bfc
Add ApplicationFlags.app_commands_badge
2022-07-21 15:00:40 -04:00
Rapptz
d52bc5d225
Cache voice members on start up if MemberCacheFlags.voice is enabled
...
Fix #8209
2022-07-20 23:12:36 -04:00
Rapptz
0b1c5df3e0
Fix minimum and maximum being casted to str in Range[str, ...]
2022-07-20 23:12:00 -04:00
Rapptz
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
Rapptz
98c4f2ae8b
Fix utils.copy_doc being partially unknown
2022-07-19 01:36:18 -04:00
Rapptz
a01dad283f
Add extraneous debug logging to sub ratelimits being detected
2022-07-19 01:36:18 -04:00
Rapptz
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
Rapptz
85ea418776
Special case message deletion sub rate limits
2022-07-19 00:07:28 -04:00
Rapptz and Josh
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
Rapptz
2067819b75
Fix some minor typing errors
2022-07-17 21:40:05 -04:00
Rapptz
b917904c1b
Prevent launching shards when bot is closed
...
Fix #8210
2022-07-06 05:54:18 -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
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
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
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
Rapptz
b8ddb17b14
Fix fallback_to_global not working with context menus
...
Fix #8167
2022-06-20 06:20:46 -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
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
Rapptz
c0b4c37418
Remove extraneous assignment in logging documentation
2022-06-13 17:14:19 -04:00
Rapptz
9c9703efc4
Remove unnecessary construction of logging.Formatter in docs
2022-06-13 17:13:21 -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
Rapptz
66881ba458
Remove gateway trace information
...
This was unused anyway
2022-06-13 01:06:15 -04:00
Rapptz
53685b9b86
Change stderr prints to use the logging module instead
2022-06-13 01:06:15 -04:00
Rapptz
49e683541b
Add default logging configuration when using Client.run
...
While it is possible to do this type of your set up yourself, it's
better for beginners to have logging automatically set up for them.
This has come up often in the help channel over the years. This also
provides an escape hatch to disable it.
2022-06-13 00:30:13 -04:00
Rapptz
768242b00e
Fix typo in async with documentation
2022-06-12 16:49:33 -04:00
Rapptz
334ef1d7fa
Add support for discord.abc.GuildChannel annotations in app commands
2022-06-11 20:36:15 -04:00
Rapptz
d19faa5f32
Raise an exception when wait_until_ready is called without a loop
2022-06-11 20:29:55 -04:00
Rapptz
377dde4e4e
Change app command permission models guild to not be None
2022-06-07 01:56:44 -04:00
Rapptz
75d57ab3ce
Fix warning in entity_type reassignment
2022-06-06 12:26:05 -04:00
Rapptz
3fe9fc92eb
Automatically infer entity_type when passing concrete channels
...
This affects Guild.create_scheduled_event and ScheduledEvent.edit
Previously, you would always be required to pass it in. However, it
makes sense to not repeat yourself if you already know it's a stage
channel or a voice channel due to the type information.
2022-06-06 08:56:04 -04:00
Rapptz
9df6aa86c8
Fix state modification endpoints on ScheduledEvent not working
...
Closes #8114
2022-06-06 08:34:19 -04:00
Rapptz
acb0302403
Fix "to top" string not being exported in .pot files
2022-06-06 07:44:26 -04:00
Rapptz
a106201ad3
Fix certain HTML and JS strings not being exposed to .pot files
2022-06-05 11:10:53 -04:00
Rapptz
db5a22d791
Move dropdown icon to static folder
...
This actually makes it render in the documentation
2022-06-05 01:24:20 -04:00
Rapptz
d1039e209e
Skip default parameter validation when using a transformer
...
Fixes #8110
2022-06-05 01:18:16 -04:00
Rapptz
e543abd950
Add support for new thread_name parameter in Webhook.send
2022-05-31 18:25:26 -04:00
Rapptz
259c6733a3
Add webhook creation methods to ForumChannel
2022-05-31 18:15:54 -04:00
Rapptz
0b026b1283
Elaborate on rename decorator behaviour
2022-05-31 18:14:31 -04:00
Rapptz
36f039a1bf
[commands] Fix interaction baton not being set during Context creation
2022-05-30 08:50:19 -04:00
Rapptz
74f3496a74
Add a bandaid fix for Sphinx bug involving admonitions in .pot files
...
Ref: https://github.com/sphinx-doc/sphinx/issues/10334
2022-05-27 04:30:38 -04:00
Rapptz
4c74523794
Fix versionadded docstrings in voice connect methods
2022-05-27 04:15:23 -04:00
Rapptz
cf031f71b9
Add a new extlink for discord documentation
2022-05-27 04:05:01 -04:00
Rapptz
081f483a0d
Fix tree not properly accounting for override when checking limits
2022-05-25 23:40:20 -04:00
Rapptz
af311bff09
Change .pot files to only contain at most 5 context lines
...
Crowdin did not like having many comments which caused the upload to
fail.
2022-05-24 10:45:28 -04:00
Rapptz
77baa06a99
Fix bug in permission resolution when dealing with timed out members
...
This would lead to timed out members having the read_messages
permission set to True instead of False
2022-05-23 11:56:05 -04:00
Rapptz
3dddddc8f9
[commands] Change Context.typing to defer for interaction contexts
2022-05-22 21:49:27 -04:00
Rapptz
ee71366f72
Fetch application_info on login
...
This allows users to no longer pass application_id when calling sync
inside setup_hook
2022-05-22 19:52:50 -04:00
Rapptz
06c43d6772
[commands] Add support for NSFW commands for hybrid commands
2022-05-22 19:31:28 -04:00
Rapptz
573b2121b7
Add support for NSFW application commands
...
Of course, this somehow doesn't work with subcommands
2022-05-22 19:20:37 -04:00
Rapptz
a47396b21e
[commands] Change guild_only check to set guild_only in hybrid commands
2022-05-22 18:48:01 -04:00
Rapptz
7905d63f7c
Reword missing annotation error to be a bit clearer
2022-05-20 17:21:31 -04:00
Rapptz
e813e5efe7
Remove undocumented methods from function signature changes
2022-05-20 16:52:55 -04:00
Rapptz
93e1ff5f07
Change aiohttp object construction to no longer take loop objects
2022-05-20 15:08:38 -04:00
Rapptz
37076a04de
Fix autocomplete example to not be as confusing
2022-05-18 20:53:33 -04:00
Rapptz
544bb1e237
Fix typo in FlagConverter example
2022-05-16 17:05:21 -04:00
Rapptz
04f5fcf741
Fix Connectable.connect typing having bad inference if cls is missing
2022-05-16 15:34:51 -04:00
Rapptz
b7e25645dc
Fix audit log bulk message delete not exposing count
2022-05-14 09:36:28 -04:00
Rapptz
573bb32a1e
Fallback to an unavailable guild instead of an Object in interactions
2022-05-14 06:50:27 -04:00
Rapptz
f780b0a283
Add setting to fallback to global command if guild command isn't found
2022-05-12 06:36:19 -04:00