-
instance 1: Handling my application commands instance 2: Handling my $prefix commands when i execute an application commands everything all right. instance 1 does his job, i get my response. fine but in server y it says application command not found, i know you will not find it, i want to tell instance 2, it is okay if you do not find this, chill out. $prefix commands can be handled by this:
but how to handle application errors? Error looks like this: ERROR discord.app_commands.tree Ignoring exception in command tree
Traceback (most recent call last):
File "/venv/lib/python3.8/site-packages/discord/app_commands/tree.py", line 1089, in wrapper
await self._call(interaction)
File "/venv/lib/python3.8/site-packages/discord/app_commands/tree.py", line 1219, in _call
command, options = self._get_app_command_options(data)
File "/venv/lib/python3.8/site-packages/discord/app_commands/tree.py", line 1125, in _get_app_command_options
raise CommandNotFound(name, parents)
discord.app_commands.errors.CommandNotFound: Application command 'memes' not found tried this in main.py tree = discord.app_commands.CommandTree(bot)
@tree.error
async def on_app_command_error(interaction: discord.Interaction, error: discord.app_commands.AppCommandError) -> None:
return got an error: Traceback (most recent call last):
File "main.py", line 46, in <module>
tree = discord.app_commands.CommandTree(bot)
File "/venv/lib/python3.8/site-packages/discord/app_commands/tree.py", line 134, in __init__
raise ClientException('This client already has an associated command tree.')
discord.errors.ClientException: This client already has an associated command tree. |
Beta Was this translation helpful? Give feedback.
Answered by
Soheab
Sep 8, 2022
Replies: 1 comment 1 reply
-
It's |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
aurkaxi
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It's
@bot.tree.error
*