From f823675710f22f7cf67e65b2e27971570ae0bf0e Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 1 Jun 2023 20:37:00 +0200 Subject: [PATCH] First attempt at applying fixed to breaking changes --- reginaldCog/__init__.py | 4 ++-- reginaldCog/reginald.py | 14 ++++++++------ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/reginaldCog/__init__.py b/reginaldCog/__init__.py index 8b0d814..9e5ad7a 100644 --- a/reginaldCog/__init__.py +++ b/reginaldCog/__init__.py @@ -1,6 +1,6 @@ from redbot.core.bot import Red from .reginald import ReginaldCog -def setup(bot: Red): +async def setup(bot: Red): cog = ReginaldCog(bot) - bot.add_cog(cog) \ No newline at end of file + await bot.add_cog(cog) \ No newline at end of file diff --git a/reginaldCog/reginald.py b/reginaldCog/reginald.py index 58ebd4c..2b14ba2 100644 --- a/reginaldCog/reginald.py +++ b/reginaldCog/reginald.py @@ -17,12 +17,14 @@ class ReginaldCog(commands.Cog): def __init__(self, bot): self.bot = bot self.config = Config.get_conf(self, identifier=71717171171717) - self.config.register_global( - openai_model="gpt-3.5-turbo" - ) - self.config.register_guild( - openai_api_key=None - ) + default_global = { + "openai_model": "gpt-3.5-turbo" + } + default_guild = { + "openai_api_key": None + } + self.config.register_global(**default_global) + self.config.register_guild(**default_guild) def has_kanium_role(): async def predicate(ctx):