From 60bda11c25c40230bf3381e51bc16311b4c437a6 Mon Sep 17 00:00:00 2001 From: Kaveen Kumarasinghe Date: Sat, 31 Dec 2022 06:01:47 -0500 Subject: [PATCH] Add clearer message for when a rate limit might've occured, clear awaiting_responses --- cogs/gpt_3_commands_and_converser.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cogs/gpt_3_commands_and_converser.py b/cogs/gpt_3_commands_and_converser.py index cc5bfda..1bc81ad 100644 --- a/cogs/gpt_3_commands_and_converser.py +++ b/cogs/gpt_3_commands_and_converser.py @@ -600,8 +600,10 @@ class GPT3ComCon(commands.Cog, name="GPT3ComCon"): # General catch case for everything except Exception: - message = "Something went wrong, please try again later" + message = "Something went wrong, please try again later. This may be due to upstream issues on the API, or rate limiting." await ctx.send_followup(message) if from_context else await ctx.reply(message) + if user_id in self.awaiting_responses: + self.awaiting_responses.remove(user_id) traceback.print_exc() await self.end_conversation(ctx) return