diff --git a/chatGpt/__init__.py b/chatGpt/__init__.py new file mode 100644 index 0000000..297f77e --- /dev/null +++ b/chatGpt/__init__.py @@ -0,0 +1,4 @@ +from .chatgpt import ChatGpt + +def setup(bot): + bot.add_cog(ChatGpt(bot)) \ No newline at end of file diff --git a/chatGpt/chatgpt.py b/chatGpt/chatgpt.py new file mode 100644 index 0000000..2c7442e --- /dev/null +++ b/chatGpt/chatgpt.py @@ -0,0 +1,25 @@ +from redbot.core import commands +from redbot.core import Config +import re +import discord +from datetime import datetime +from revChatGPT.revChatGPT import Chatbot + +class ChatGpt(commands.Cog): + """Cog to enable chat powered by OpenAi Chat GPT""" + + async def __init__(self, bot): + self.bot = bot + email = await self.bot.get_shared_api_tokens("openai", "email") + password = await self.bot.get_shared_api_tokens("openai", "password") + self.config = { + "email": email, + "password": password, + } + + @commands.command() + async def testchat(self, ctx: commands.Context): + """Test""" + await ctx.send(f"email {self.config.email}, password {self.config.password}") + + \ No newline at end of file diff --git a/chatGpt/info.json b/chatGpt/info.json new file mode 100644 index 0000000..04417f2 --- /dev/null +++ b/chatGpt/info.json @@ -0,0 +1,9 @@ +{ + "AUTHOR" : "Juni (juniteevee)", + "DESCRIPTION" : "Enable chatting with bot using OpenAi ChatGPT", + "DISABLED" : false, + "SHORT" : "Enable chatting with bot using OpenAi ChatGPT", + "NAME" : "Chat-Gpt", + "INSTALL_CMD" : "ChatGPT. Install at own risk", + "REQUIREMENTS" : ["revChatGPT"] +} \ No newline at end of file