diff --git a/bot/src/core/bot.py b/bot/src/core/bot.py index 218959a..67cd5a4 100644 --- a/bot/src/core/bot.py +++ b/bot/src/core/bot.py @@ -190,7 +190,6 @@ async def on_guild_update(self, before: disnake.Guild, after: disnake.Guild): async def on_command_error( self, ctx: commands.Context, error: commands.CommandError ): - print(error) if isinstance(error, commands.CheckFailure): pass if isinstance(error, commands.CommandNotFound): @@ -273,14 +272,13 @@ async def on_slash_command_error( ), ephemeral=True, ) - elif isinstance(error, disnake.errors.InteractionResponded): - await inter.edit_original_message( - embed=embeds.error_embed() - ) else: - await inter.response.send_message( - embed=embeds.error_embed(repr(error)), ephemeral=True - ) + try: + await inter.response.send_message( + embed=embeds.error_embed(repr(error)), ephemeral=True + ) + except disnake.errors.InteractionResponded: + await inter.edit_original_message(embed=embeds.error_embed(repr(error))) def tictactoe_check_winner(self, winning_conditions, mark): for condition in winning_conditions: