From e0019a2dc216bf6e8ed96dc6b50f6c2f6df11510 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 14 Mar 2023 17:58:19 +0100 Subject: [PATCH] Adding debugging logs --- reginaldCog/reginald.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/reginaldCog/reginald.py b/reginaldCog/reginald.py index a9b67c0..4682a72 100644 --- a/reginaldCog/reginald.py +++ b/reginaldCog/reginald.py @@ -32,8 +32,9 @@ class ReginaldCog(commands.Cog): ) await ctx.send(response.choices[0].text.strip()) except openai.error.OpenAIError as e: - await ctx.send("I apologize, sir, but I am unable to generate a response at this time.") - print(f"OpenAI API Error: {e}") + import traceback + traceback.print_exc() + await ctx.send(f"I apologize, sir, but I am unable to generate a response at this time. Error message: {str(e)}") def setup(bot): cog = ReginaldCog(bot)