A Discord chatbot that combines Discord.js with OpenAI's GPT-3 for engaging conversations.
- Node.js installed.
- Discord bot token.
- OpenAI API credentials (organization ID and API key).
-
Clone this repo:
git clone https://github.com/matmuenzel/discord-gpt-chatbot.git
-
Navigate to the project folder:
cd discord-gpt-chatbot
-
Install dependencies:
npm install
-
Create a .env file with your Discord token, OpenAI org ID, and API key:
DISCORD_TOKEN=your_discord_bot_token OPENAI_ORG=your_openai_organization_id OPENAI_KEY=your_openai_api_key
-
Start the bot:
npm start
-
The bot will log "Discord connected." when it connects successfully.
-
Invite the bot to your Discord server with the necessary permissions.
-
Chat with the bot, and it will reply using GPT-3 generated responses.
Customize the bot's behavior in index.js
. You can adjust Discord intents and GPT-3 model settings.