Commit Graph

3921 Commits

Author SHA1 Message Date
f5341a1cfa Document cases where setup_hook can deadlock rather than raising 2022-03-17 09:56:25 -04:00
202b993da3 Add Interaction.command and Interaction.namespace attributes 2022-03-17 09:45:21 -04:00
3c6daff473 Change default ellipsis descriptions to use U+2026 2022-03-17 07:37:33 -04:00
70470753cd Update images in bot creation guide 2022-03-17 07:27:56 -04:00
caf2000fe8 Add missing annotation for ThreadMember.id 2022-03-17 07:27:13 -04:00
e01d4a31eb Replace invariant container types with wider types where applicable 2022-03-17 07:26:01 -04:00
3e77a7b29e Forbid wait_until_ready inside setup_hook 2022-03-17 07:25:10 -04:00
c77bbc4dcf Move with_counts parameter documentation where it belongs 2022-03-16 07:43:31 -04:00
5b8bcaff73 Validate and bind parent in Group.add_command 2022-03-16 07:32:01 -04:00
7c0a9e901d Fully initialise asyncio state in __aenter__ 2022-03-16 05:51:25 -04:00
575eacb1bf Change loop sentinel error to not use a tuple
This was an unintentional error
2022-03-16 05:50:28 -04:00
1fba54ce97 Reword DeletedMessageReference docstring to be clearer 2022-03-16 05:12:26 -04:00
1192d842e1 Fix some type checker errors and remove some type ignores
Caught from an upgraded Pyright
2022-03-16 01:46:58 -04:00
6d75d2e937 Fix unnecessary type ignores in gateway 2022-03-16 01:19:45 -04:00
d2b69ce19a Downgrade unnecessary type ignore into a warning instead of error 2022-03-16 01:01:18 -04:00
380e9118d5 Temporarily change Crowdin upload to be a manual workflow dispatch 2022-03-16 00:42:06 -04:00
61577677cd Fix Guild.fetch_members limit parameter typing to be Optional 2022-03-16 00:39:05 -04:00
caf1c6eae4 Fix overload in StoreChannel 2022-03-16 00:13:39 -04:00
446c502995 Change lowercase detection to work with CJK languages
str.islower() does not properly work with characters in the Lo category
so CJK languages fail the check.

Fix #7698
2022-03-15 23:37:54 -04:00
fd5dea4e34 Update Permissions.stage_moderator 2022-03-15 23:33:11 -04:00
2d28d7b765 Add Crowdin actions 2022-03-15 21:28:29 -04:00
26457b6d50 Remove automatic defer behaviour from View and Modal
This doesn't make as much sense anymore now that
InteractionResponse.edit_message exists.
2022-03-15 10:30:19 -04:00
e5461c73b6 [commands] Check if any base in a Cog is a subclass of Group 2022-03-15 09:50:49 -04:00
beafaa8a8b Change intent comments to be consistent in the examples 2022-03-15 07:38:34 -04:00
c28c3f4440 Keep comments consistent with other before/after comments 2022-03-15 07:25:35 -04:00
8ced1143e3 Change missing application ID error to be more descriptive 2022-03-15 07:22:44 -04:00
27dd986858 Forbid Choice annotations being used with autocomplete parameters
Since the Choice are synthetic, the library doesn't have a
pre-populated list of choices to know what to use as the resulting
value.
2022-03-15 07:09:41 -04:00
698d1e12a1 Add CommandTree.error decorator to set on_error dynamically 2022-03-15 06:57:25 -04:00
2bf612cd67 Fix Client.close erroring if done before proper async initialisation 2022-03-15 06:51:19 -04:00
20aa6f866d Fix CommandTree removal and getter overloads 2022-03-15 03:34:04 -04:00
f015b59e43 Add CommandTree.walk_commands and Group.walk_commands 2022-03-15 03:24:20 -04:00
5bc085ebab Properly set root parent before copying a command's binding 2022-03-15 03:24:20 -04:00
ca4db68686 Fix grammar issue for Message.add_reaction docs 2022-03-14 22:51:28 -04:00
aa006f345a Add more special methods to Namespace for ease of use.
* __getattr__ would allow it to no longer AttributeError while
  simultaneously letting linters and type checkers understand that
  this is a bag of dynamic attributes.
* __contains__ allows checking for the existence of an attribute
* __getitem__ allows accessing a value even if its name is not a valid
  Python identifier.
2022-03-14 22:49:47 -04:00
f0a47f5a40 Allow single element Literal in app commands
Fix #7690
2022-03-14 21:17:00 -04:00
47cb7d03ec [commands] Type BotBase.help_command as Optional 2022-03-14 21:02:36 -04:00
6cf7c4a7d7 Add message content to doc examples
This also changes the wording of Context's attributes 
for consistency.
2022-03-14 21:01:48 -04:00
68dbf0f882 [commands] Fix message converter not inferring channel when missing 2022-03-14 21:01:14 -04:00
3fd8f76c61 Add missing underscore in Modal refresh method 2022-03-14 21:00:39 -04:00
934ab4151a Mark state refresh methods as private with an underscore
People kept wondering what it is or what it does.
2022-03-14 07:50:25 -04:00
6dd8845e4f Fix Guild.audit_logs order being reversed without oldest_first and after 2022-03-14 06:23:40 -04:00
bc70ec5cfd Change persistent view example to use new setup_hook 2022-03-14 06:12:58 -04:00
c95c163266 Fix background task examples 2022-03-14 06:08:54 -04:00
9b77331603 Change loop sentinel to provide a more descriptive error message
This way people don't think it's a bug. I imagine some people won't
read it, but at least when you point it out they might get it.
2022-03-14 05:52:35 -04:00
aa18e573c3 Mark MISSING as hashable to allow it to be used in dataclasses in 3.11 2022-03-14 05:45:58 -04:00
abcec5da9d [tasks] Use the local timezone when comparing for the start time
Fix #7676
2022-03-14 04:54:56 -04:00
a4676804ec Show inherited members in InteractionMessage 2022-03-14 02:21:05 -04:00
3e70a4e798 Fix typo in add_cog doc 2022-03-14 01:33:34 -04:00
2da6415008 Add more tests for JST regression case 2022-03-14 01:07:49 -04:00
c6ab67420e Remove Embed.Empty in favour of None 2022-03-14 00:52:55 -04:00