aboutsummaryrefslogtreecommitdiff
path: root/src/utils/command_tree.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/command_tree.py')
-rw-r--r--src/utils/command_tree.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/utils/command_tree.py b/src/utils/command_tree.py
new file mode 100644
index 0000000..31ec2c1
--- /dev/null
+++ b/src/utils/command_tree.py
@@ -0,0 +1,19 @@
+import discord
+from discord import app_commands
+from discord.ext.commands.errors import *
+
+from config import create_embed
+
+
+class Tree(app_commands.CommandTree):
+ async def on_error(
+ self,
+ interaction: discord.Interaction,
+ error: app_commands.AppCommandError,
+ ):
+
+ if isinstance(error, CommandNotFound):
+ return
+
+ else:
+ raise error