WumpusGPT is a Discord chatbot written in TypeScript and powered by OpenAI's gpt-4
and gpt-3.5-turbo
language models.
Although WumpusGPT is not quite the same as ChatGPT, they both utilize the same language model so you will yield very similar results.
Built with OpenAI Node.js Library and discord.js. Inspired by OpenAI's GPT Discord Bot.
You can invite the bot to your server by clicking here.
Warning This is a work in progress. Feel free to contribute!
- Direct Messaging
- Mention Replies
-
Message Moderation -
Rate Limiting -
Thread Pruning
- Configurable bot instruction/behaviour
- Remembers previous messages in threads
- Ability to regenerate responses (only in threads)
- Image generation using DALL·E via
/image
- Rate limiting per user to prevent abuse
- Automatic thread pruning (enabled by default)
-
Copy
.env.example
to.env
and fill in the values as detailed below -
Create a MySQL database (I recommend PlanetScale if you don't want to host locally) and fill in
DATABASE_URL
-
Create a Discord application at https://discord.com/developers/applications
-
Go to the Bot tab and click "Add Bot"
- Click "Reset Token" and fill in
DISCORD_TOKEN
- Disable "Public Bot" unless you want your bot to be visible to everyone
- Enable "Server Members Intent" and "Message Content Intent" under "Privileged Gateway Intents"
- Click "Reset Token" and fill in
-
Go to the OAuth2 tab, copy your "Client ID", and fill in
DISCORD_CLIENT_ID
-
Go to https://beta.openai.com/account/api-keys, create an API key, and fill in
OPENAI_API_KEY
-
Feel free to set
OPENAI_MODEL
if you have access togpt-4
, otherwisegpt-3.5-turbo
is the default -
Install dependencies and run the bot
npm install npm start
Or run the bot in a Docker image:
docker-compose up -d docker-compose logs -t wumpus-gpt-discord-bot
You should see an invite URL in the console. Copy and paste it into your browser to add the bot to your server.
-
Start chatting with the bot via the
/chat
or/ask
commands
Licensed under the MIT license.