From 9ff477dfe13d0e0be1045fb1b9fdd7699646b548 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 14 Mar 2023 17:40:21 +0100 Subject: [PATCH] debugging --- reginaldCog/reginald.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/reginaldCog/reginald.py b/reginaldCog/reginald.py index 9aee390..8134449 100644 --- a/reginaldCog/reginald.py +++ b/reginaldCog/reginald.py @@ -6,7 +6,7 @@ from ratelimit import rate_limited class ReginaldCog(commands.Cog): def __init__(self, bot): self.bot = bot - self.api_key = self.bot.config.get("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") + self.api_key = self.bot.config.get("openai_api_key") openai.api_key = self.api_key self.model = self.bot.config.get("openai_model") self.lock = Lock() @@ -35,6 +35,7 @@ class ReginaldCog(commands.Cog): print(f"OpenAI API Error: {e}") def setup(bot): - bot.config.register("openai_api_key", default=None) + bot.config.register("openai_api_key", default="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") bot.config.register("openai_model", default="text-davinci-002") - bot.add_cog(ReginaldCog(bot)) \ No newline at end of file + cog = ReginaldCog(bot) + bot.add_cog(cog) \ No newline at end of file