disarchive/src/utils/command_tree.py
2025-04-03 22:34:37 -05:00

18 lines
368 B
Python

import discord
from discord import app_commands
from discord.ext.commands.errors import *
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