An interface between a Discord Server and OpenAi's ChatCompletions Api.
This is a meant to be an extension of Chat GPT into Discord, with a couple of customization features:
- Ability to activate
/channel
Discord Bot Ai in a Channel
activate_channel.mov
- Ability to set a custom system prompt
/instruct
within each channel.
instruct.-.HD.720p.mov
- Ability to clear chat history
/reset-messages
with Discord Bot Ai.
reset-messages.-.HD.1080p.mov
- Ability to upload file(s) and provide instructions for evaluating each file.
file-upload.-.HD.720p.mov
- Ability to interrupt Discord Bot Ai
interupt.-.HD.1080p.mov
- Create a Discord app
- See Building your first Discord App for reference
- Require
TOKEN
,CLIENT_ID
, andGUILD_ID
- Openai API Key
- See API Keys
npm i
- Create
.env
file at root of project with entries for:TOKEN=your-discord-token CLIENT_ID=your-discord-app-client-id GUILD_ID=the-discord-server-where-youve-invited-your-app OPENAI_API_KEY=your-openai-api-key
- Create database via
npm run knex:migrate:latest
- Deploy slash commands to your server via
npm run deploy-commands
- Run app via
npm start
Follow Installation instructions.
Note
VSCode: Debug by navigating to
package.json
and click▷ Debug
text abovescripts:
Selectstart:dev
and VSCode will run script and attach debugger.
Run npm test
Note
VSCode: Debug tests via Jest Extension.