Commit Graph

76 Commits

Author SHA1 Message Date
44a44e938f Reformat entire project with ruff instead of black 2025-08-18 20:16:10 -04:00
8953938a53 Update Pyright to v1.1.394 2025-02-18 03:29:09 -05:00
9da131ed26 Fix variance typing issue with CommandTree.error decorator 2024-10-14 18:58:24 -04:00
cc32fb364b Add notes about contexts and installation_types availability 2024-05-30 22:51:51 -04:00
2e2f51fd5c First pass at supporting user apps
Co-authored-by: red <red@kalab.sk>
Co-authored-by: Vioshim <63890837+Vioshim@users.noreply.github.com>
2024-05-04 23:25:01 -04:00
9e2f2cb3af Log suppressed autocomplete exceptions 2023-09-16 22:34:51 -04:00
4e09c34bbb Suppress exceptions from invoking autocomplete 2023-02-17 13:24:59 -05:00
93ed1646d2 Cleanup some private utilities in app_commands.commands 2023-02-02 00:33:18 -05:00
bbba8c650f Add missing generic parameters on various Interaction parameters 2023-01-19 07:00:16 -05:00
95b6bd8782 Add coro tag to docstrings that were missing it 2022-10-02 17:52:18 -04:00
6981eb69c4 Normalize type formatting in TypeError
Normalize most mixed usages of `__class__`, `__class__!r`, 
`__class__.__name__!r` to the standard form of 
`__class__.__name__`
2022-09-12 15:25:55 -04:00
5cc6af5917 Fix CommandSyncFailure raising for other 400 error types 2022-09-06 02:56:48 -04:00
b12b4b18fd Mark public callbacks as positional-only 2022-08-22 15:21:19 -04:00
354d4bace4 Add missing decorator signs for interaction documentation 2022-08-21 18:25:31 -04:00
59677c6738 Fix CommandTree.on_error not triggering if interaction_check raises 2022-08-18 21:10:10 -04:00
bd19ad05e7 Fix app_command_completion triggering on certain errors 2022-08-16 20:03:02 -04:00
0ec06f0ac5 Add on_app_command_completion event
Fix #8126
2022-08-15 09:19:01 -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
cc0c261925 Change auto_locale_strings default to True 2022-08-08 20:17:47 -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
6c42065210 Fix various a -> an typos across the library
Closes #8301, #8287
2022-08-04 08:17:07 -04:00
0546343bcb [commands] Add cog-level app command error special method 2022-07-17 23:45:19 -04:00
0eb3d26343 Add generic arguments for extras typing 2022-06-27 22:35:22 -04:00
9fc4769b18 Add extras attribute to app commands command types 2022-06-21 20:38:56 -04:00
b8ddb17b14 Fix fallback_to_global not working with context menus
Fix #8167
2022-06-20 06:20:46 -04:00
53685b9b86 Change stderr prints to use the logging module instead 2022-06-13 01:06:15 -04:00
f6a74f74a7 Fix typo in CommandTree.fetch_command's NotFound doc 2022-06-04 03:25:06 -04:00
af265dba06 Add CommandTree.fetch_command 2022-06-03 04:46:20 -04:00
823d650e97 Update comments in CommandTree to reflect commands v2 2022-06-01 02:38:20 -04:00
081f483a0d Fix tree not properly accounting for override when checking limits 2022-05-25 23:40:20 -04:00
573b2121b7 Add support for NSFW application commands
Of course, this somehow doesn't work with subcommands
2022-05-22 19:20:37 -04:00
f780b0a283 Add setting to fallback to global command if guild command isn't found 2022-05-12 06:36:19 -04:00
bd727d2b0c Add edit and delete methods to AppCommand 2022-05-05 06:20:55 -04:00
5536ef1eea Update to pyright 1.1.242 2022-04-30 19:37:01 -04:00
ab64a2eae9 Fix typing of guilds kwargs to take Sequence instead of List 2022-04-28 10:48:57 -04:00
cdf442bc32 Fix signature detection in CommandTree.error decorator 2022-04-13 22:30:39 -04:00
3f4fb91328 Change CommandTree.on_error to only take two parameters
The command that failed can be retrieved using Interaction.command
so having it as a parameter doesn't make much sense.
2022-04-13 22:29:27 -04:00
83fae4f0fa Add CommandTree.clear_commands 2022-04-13 22:20:05 -04:00
5892bbd8b4 Allow getting all commands from CommandTree.get_commands
Co-authored-by: Danny <Rapptz@users.noreply.github.com>
2022-04-10 23:00:18 -04:00
907d5e0ee7 Document Forbidden exception in CommandTree.sync 2022-04-03 22:57:54 -04:00
24f8f8d4a7 Rename MaxCommandsReached to CommandLimitReached 2022-03-31 23:10:13 -04:00
a0618ef791 Clarify documentation certain tree methods 2022-03-31 10:31:48 -04:00
34b2ff40b6 Change ValueError on max commands reached to a more specific exception 2022-03-31 09:34:48 -04:00
985f5732c0 Refactor ContextMenu constructor to allow app command type inferring 2022-03-25 09:11:11 -04:00
f26d3a7155 Add interaction check to command tree
In some cases, it's desirable for our command tree to only process a
subset of incoming interactions, such as in a multi process deployment.
2022-03-24 22:32:56 -04:00
84c38f1f22 Ignore errors if it's already handled in app commands 2022-03-21 04:07:05 -04:00
f7c664e3e2 Add error handler support for context menus 2022-03-21 03:56:28 -04:00
202b993da3 Add Interaction.command and Interaction.namespace attributes 2022-03-17 09:45:21 -04:00