From 64ac4268f07d5adbb4578c935ae81635ae6de950 Mon Sep 17 00:00:00 2001 From: insert Date: Sun, 11 Aug 2024 13:10:03 -0400 Subject: [PATCH] Update --- misc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc.py b/misc.py index a0fc0f8..1bda919 100644 --- a/misc.py +++ b/misc.py @@ -19,11 +19,11 @@ class misc(commands.Cog): @commands.Cog.listener('on_application_command_error') async def errorhandler(self, interaction: nextcord.Interaction, error: nextcord.DiscordException): + strerror = traceback.format_exc(error) error = traceback.format_exception(type(error), error, error.__traceback__) print(error, file=sys.stderr) - error = traceback.format_exc(error) random.shuffle(errormsg) - message = f"{errormsg[0]}\n```py\n{error[-1800:]}\n```\n Contact <@{self.bot.owner_id}> if the error persists" + message = f"{errormsg[0]}\n```py\n{strerror[-1800:]}\n```\n Contact <@{self.bot.owner_id}> if the error persists" try: await interaction.response.send_message(message, ephemeral=True) except: