mirror of
https://github.com/AskDavis/nate-discord.git
synced 2026-01-03 04:19:48 -08:00
debug in docker
This commit is contained in:
Binary file not shown.
@@ -3,20 +3,18 @@ import os
|
||||
import discord
|
||||
from app.mabel.connect_openai import chatgpt_response
|
||||
|
||||
load_dotenv()
|
||||
#load_dotenv()
|
||||
discord_token=os.getenv('DISCORD_TOKEN')
|
||||
print("DISCORD_TOKEN: ", discord_token)
|
||||
class MyClient(discord.Client):
|
||||
async def on_ready(self):
|
||||
print('Logged in as: ', self.user)
|
||||
async def on_message(self, message):
|
||||
if message.author == client.user:
|
||||
return
|
||||
if message.content.startswith('!mabel'):
|
||||
prompt = message.content[7:]
|
||||
response = await chatgpt_response(prompt)
|
||||
if "mabel" in message.content.lower():
|
||||
response = await chatgpt_response(message.content)
|
||||
await message.channel.send(response)
|
||||
return
|
||||
return
|
||||
|
||||
intents=discord.Intents.default()
|
||||
intents.messages=True
|
||||
|
||||
Reference in New Issue
Block a user