aboutsummaryrefslogtreecommitdiff
path: root/code/bot.py
diff options
context:
space:
mode:
authorParker <contact@pkrm.dev>2024-07-11 00:43:06 -0500
committerParker <contact@pkrm.dev>2024-07-11 00:43:06 -0500
commitc884b640f77c14886c5c04e97c93c89c64fd7f1e (patch)
treefa7188ff5efd6b0fd9b4353849f0db1bc6477679 /code/bot.py
parentbe8e929be5a94aeef8e8dc865a0257de82b7a1f5 (diff)
Revamp OpenAI recommendations
Diffstat (limited to 'code/bot.py')
-rw-r--r--code/bot.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/code/bot.py b/code/bot.py
index 6735522..da23a28 100644
--- a/code/bot.py
+++ b/code/bot.py
@@ -2,6 +2,7 @@ import discord
from discord.ext import commands, tasks
import os
import requests
+import openai
import config
from tree import Tree
@@ -32,6 +33,8 @@ class MyBot(commands.Bot):
if ext.endswith(".py"):
await self.load_extension(f"cogs.owner.{ext[:-3]}")
+ bot.openai = openai.OpenAI(api_key=config.OPENAI_API_KEY)
+
bot = MyBot()
bot.remove_command("help")
@@ -65,4 +68,4 @@ async def get_access_token():
if __name__ == "__main__":
config.load_config()
- bot.run(config.TOKEN)
+ bot.run(config.TOKEN) \ No newline at end of file