What the fuck

This commit is contained in:
unknown 2023-03-18 17:47:37 +01:00
parent 738d3dde94
commit 25f28cc24d
2 changed files with 6 additions and 3 deletions

View File

@ -1,5 +1,5 @@
from .reginaldgptCog import ReginaldGptCog
from redbot.core.bot import Red from redbot.core.bot import Red
from .reginaldgpt import ReginaldGptCog
def setup(bot: Red): def setup(bot: Red):
cog = ReginaldGptCog(bot) cog = ReginaldGptCog(bot)

View File

@ -1,11 +1,13 @@
import os
import discord import discord
import os
from redbot.core import Config, checks, commands from redbot.core import Config, checks, commands
import openai import openai
class ReginaldGptCog(commands.Cog): class ReginaldGptCog(commands.Cog):
def __init__(self, bot): def __init__(self, bot):
self.bot = bot self.bot = bot
self.bot = bot
self.config = Config.get_conf(self, identifier=71717171171717)
openai.api_key = os.environ["OPENAI_API_KEY"] openai.api_key = os.environ["OPENAI_API_KEY"]
@commands.guild_only() @commands.guild_only()
@ -32,4 +34,5 @@ class ReginaldGptCog(commands.Cog):
await ctx.send("As an AI robot, I errored out.") await ctx.send("As an AI robot, I errored out.")
def setup(bot): def setup(bot):
bot.add_cog(ReginaldGptCog(bot)) cog = ReginaldGptCog(bot)
bot.add_cog(cog)