blob: 31ec2c1ca4fb071acb05f69e3eea78c3ff3c04f3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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
|