- ✅ Replies when pinged.
- ✅ Replies to last message in channel when your friend (i.e. Derek) starts typing.
- ✅ Randomly DMs people for added creepiness.
- ✅ Reacts to messages randomly. Will sometimes react 🤖 to the real Derek.
- ✅ Will never slur.
- Have a Discord bot. Go to https://discord.com/developers/applications and create a new application. The Message Content intent needs to be enabled. It also needs to be able to Read Messages/View Channels and Send Messages, at minimum.
- Get a ChatGPT API key. Create a ChatGPT account and go to https://platform.openai.com/api-keys.
- Install dependencies with
npm install
in terminal. - Put
export const chatgptkey = "YOUR_CHATGPT_KEY";
export const discordToken = "YOUR_DISCORD_BOT_TOKEN";
export const derekId = "DEREK_DISCORD_ID";
export const botId = "BOT_DISCORD_ID";
in src/Token.ts
.
- Run
npx tsc
to compile TypeScript. - Run
node src/Discord.js
. It should outputReady!
. - To re-run the code after a change, use
npx tsc && node src/Discord.js
.
Most (but not all) of the Derek specific data can be found in Examples.ts
. Channel whitelists can be found in the nogoChannels
and yesChannels
variables in Discord.ts
.
The default ChatGPT API requests-per-day of 200 can be easily exceeded. To overcome this you need to put in an additional $5 of credits.