Add a .env file with:
OPENAI_API_KEY=YOUR_KEY
BOT_TOKEN=YOUR_TOKEN
OpenAI API Key: https://platform.openai.com/account/api-keys
Bot Token: https://discord.com/developers/applications
run locally with node index.js
For a step-by-step tutorial, check out: https://medium.com/sopmac-labs/create-a-chatgpt-discord-bot-8b853c62b08d