Commit Graph

3897 Commits

Author SHA1 Message Date
bc00bc495e Document attachment:// URI more prominently in Embed docs 2022-08-18 09:50:16 -04:00
4abea7bafa Version bump for development 2022-08-17 23:30:19 -04:00
575af0ff51 Version bump to v2.0.0 2022-08-17 23:28:51 -04:00
2bf2bfc9b4 Add utils.setup_logging to help set up logging outside of Client.run 2022-08-17 22:53:03 -04:00
1c7747fe9d Fix nested Annotated calls not resolving 2022-08-17 10:41:57 -04:00
8dd186cf1e Fix cache eviction for ratelimit objects 2022-08-17 08:39:39 -04:00
54ee383585 [commands] Add warning if Intent.message_content is not enabled 2022-08-17 03:52:29 -04:00
cdce8fae5b Change ui.TextInput.value to not be Optional 2022-08-17 02:26:17 -04:00
f52a02359d Use built-in isascii instead of regex 2022-08-17 01:52:29 -04:00
659d6b6123 Make app_commands.describe examples consistent 2022-08-16 20:10:14 -04:00
bd19ad05e7 Fix app_command_completion triggering on certain errors 2022-08-16 20:03:02 -04:00
7be0779b65 Add root_logger setting to Client.run
This allows people one way to use the colour logger globally
2022-08-16 20:03:02 -04:00
f12cdd5f90 Switch quotes to make docs example render properly 2022-08-16 19:11:55 -04:00
288f2d169e Document that docstrings can be used to document parameters 2022-08-16 17:00:09 -04:00
5039b967a0 Document get_thread not fetching archived threads 2022-08-16 16:59:20 -04:00
1097e1d975 Add mention_spam automod trigger and change default values 2022-08-16 16:58:59 -04:00
1a11c9eeee [commands] Properly set module information for hybrid commands 2022-08-16 01:28:27 -04:00
de5fa8bc9c Improve sync error format for children options 2022-08-16 01:18:12 -04:00
4182496713 Add missing required property to Parameter 2022-08-15 14:24:16 -04:00
596f2ca222 Fix time_snowflake not being documented 2022-08-15 14:01:54 -04:00
6b50fcd5e4 Add Command.parameters to get all parameters of a command 2022-08-15 13:42:47 -04:00
5b56899676 Change snowflake_time and time_snowflake parameters to pos/kw-only 2022-08-15 13:39:03 -04:00
668196c14c [commands] Add description kwarg to parameters and show in default help 2022-08-15 12:18:23 -04:00
54541ba6f0 Ensure FFmpeg players have a _process attribute set even during errors 2022-08-15 10:32:07 -04:00
3802780f77 Change a lot of logging INFO calls to be less verbose
Some of the logs were only useful for debug scenarios, so they have
been downgraded to DEBUG. Others were in INFO but supposed to be in
WARNING so those were upgraded.
2022-08-15 10:21:36 -04:00
0ec06f0ac5 Add on_app_command_completion event
Fix #8126
2022-08-15 09:19:01 -04:00
0b69148c84 Fix float focused autocomplete options being parsed
According to the Discord docs these aren't validated
2022-08-15 08:59:29 -04:00
63b32994f4 Improve TranslationContext type narrowing using a tagged union 2022-08-15 08:17:41 -04:00
49e6fe9a0c Fix autocomplete translations calling unnecessary locales 2022-08-14 17:35:43 -04:00
32c5a0cec1 Change default Choice.name_localizations to an empty dict 2022-08-14 17:35:43 -04:00
e2d5791b67 Fix overload order on as_chunks 2022-08-14 17:32:07 -04:00
f69d4ee5cb Add Choice.name_localizations data from Discord
Fix #8337
2022-08-14 16:29:16 -04:00
ff1dd586d3 Always use last value as a fallback for Select.values 2022-08-14 15:50:16 -04:00
9c38cf3aef Fix ui.Select.values in modals 2022-08-14 15:25:43 -04:00
584c22f642 Raise TypeError when token is not a string
Co-authored-by: Danny <1695103+Rapptz@users.noreply.github.com>
2022-08-14 05:39:06 -04:00
c8db766be4 Fix empty strings crashing Namespace for float options
This feels like a Discord bug to me but it's causing issues
2022-08-14 05:38:11 -04:00
610edaeead [commands] Add option to disable auto_locale_strings in GroupCog 2022-08-14 00:59:33 -04:00
1fa7d7e402 Raise special CommandSyncFailure during sync for better errors
This is parsed from the error to allow for users to better debug
what exactly is causing the issue in sync.
2022-08-12 22:36:13 -04:00
a9025ca3d1 Remove public CommandTree.call method and make it private 2022-08-12 10:57:54 -04:00
0744737e86 Fix default_permissions serialisation error from __bool__ change 2022-08-11 18:24:23 -04:00
f1ec0919f6 Remove stack info from ratelimit logs 2022-08-10 22:55:27 -04:00
747091d4a2 Add __bool__ for flags 2022-08-10 22:49:49 -04:00
7da2048d1a Add support for resume_gateway_url 2022-08-10 22:47:27 -04:00
a36d6daec7 Fix formatting issue in app_commands 2022-08-10 22:39:53 -04:00
11278d55e8 Add command information to Parameter class 2022-08-09 23:11:40 -04:00
afcec46dfd Fix Sticker Objects type being StageInstance 2022-08-09 22:52:30 -04:00
4fbafcd718 Fix attribute error in TranslationError 2022-08-09 10:45:12 -04:00
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
d826f4f3a8 Change ui.Select.values to a ContextVar to avoid race conditions 2022-08-09 08:37:46 -04:00
dc81ff76c4 Add Object.type to Objects where a type can be determined 2022-08-09 08:18:58 -04:00