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