mirror of https://github.com/stijndcl/didier
Typing
parent
d374f1e8ab
commit
8707f467d5
|
@ -7,7 +7,6 @@ from typing import Optional, Union
|
||||||
|
|
||||||
import discord
|
import discord
|
||||||
from aiohttp import ClientSession
|
from aiohttp import ClientSession
|
||||||
from discord.app_commands import AppCommandError
|
|
||||||
from discord.ext import commands
|
from discord.ext import commands
|
||||||
from sqlalchemy.ext.asyncio import AsyncSession
|
from sqlalchemy.ext.asyncio import AsyncSession
|
||||||
|
|
||||||
|
@ -246,7 +245,7 @@ class Didier(commands.Bot):
|
||||||
async with self.postgres_session as session:
|
async with self.postgres_session as session:
|
||||||
await command_stats.register_command_invocation(session, ctx, command, tz_aware_now())
|
await command_stats.register_command_invocation(session, ctx, command, tz_aware_now())
|
||||||
|
|
||||||
async def on_app_command_error(self, interaction: discord.Interaction, exception: AppCommandError):
|
async def on_app_command_error(self, interaction: discord.Interaction, exception: Exception):
|
||||||
"""Event triggered when an application command errors"""
|
"""Event triggered when an application command errors"""
|
||||||
# If commands have their own error handler, let it handle the error instead
|
# If commands have their own error handler, let it handle the error instead
|
||||||
if hasattr(interaction.command, "on_error"):
|
if hasattr(interaction.command, "on_error"):
|
||||||
|
|
Loading…
Reference in New Issue