From efe66c8cc042394ba561c95caf198373bf997c96 Mon Sep 17 00:00:00 2001 From: Jonak-Adipta-Kalita Date: Fri, 3 Mar 2023 14:50:43 +0530 Subject: [PATCH] ok... cool? --- bot/src/core/bot.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) 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: