From 4bef93a571fc2971e47e18af7a6315eff469a5af Mon Sep 17 00:00:00 2001 From: snipe <72265661+notsniped@users.noreply.github.com> Date: Sat, 20 Apr 2024 21:42:21 +0530 Subject: [PATCH] Remove timestamp construction while firing error handler --- main.py | 1 - 1 file changed, 1 deletion(-) diff --git a/main.py b/main.py index 50d2afb..08e18ef 100644 --- a/main.py +++ b/main.py @@ -242,7 +242,6 @@ async def after_invoke(ctx): @client.event async def on_application_command_error(ctx: ApplicationContext, error: discord.DiscordException): """An event handler to handle command exceptions when things go wrong.\n\nSome exceptions may be pre-handled, but any unhandable exceptions will be logged as an error.""" - current_time = datetime.time().strftime("%H:%M:%S") if not api.auth.get_runtime_options()["debug_mode"]: if isinstance(error, commands.CommandOnCooldown): await ctx.respond(f":stopwatch: Not now! Please try after **{str(datetime.timedelta(seconds=int(round(error.retry_after))))}**") elif isinstance(error, commands.MissingPermissions): await ctx.respond(":warning: You don't have the required server permissions to run this command!", ephemeral=True)