18 lines
368 B
Python
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
|