A Discord bot that uses the ChatGPT 3.5 Turbo model to generate responses to messages.
npm i
- Modify environment variables in
.env
file
# DISCORD
DISCORD_CLIENT_ID = 123456789012345678
DISCORD_BOT_TOKEN = abcdefghijklmnopqrstuvwxyz
# CHATGPT
OPENAI_API_KEY = abcdefghijklmnopqrstuvwxyz
- Run the bot
# for dev mode
npm run dev
# for production mode
npm run build
npm start
- Invite the bot to your server
https://discord.com/oauth2/authorize?client_id=INSERT_CLIENT_ID_HERE&scope=bot&permissions=8
- Use command
/chat
to start a conversation with the bot