Delirium
A Discord auto-reply bot using Dialogflow
This project is inspired by jagrosh/Phoenix
Selfhosting
Requirements
- Node.js version 12 or higher
- Dialogflow account & project
Running
- Clone this repository
- Run
npm install
- Set environment variables in
.env
or elsewhere, refer to.env.example
for the required variables - Start the program with
npm start
DialogFlow
Overview
DialogFlow is an API that is very similar in functionality to Siri, Alexa, Cortana, Google Assistant, etc. For this project, we're using the text-based, machine-learning portion to detect topics and when to produce replies. Conveniently, a DialogFlow agent can be edited collaboratively and updates immediately, so multiple people can provide topics and responses for the bot without having to restart the bot nor have access to the bot's hosting.
Configuring
- Create an agent (and set the token to the environment as listed above)
- Delete the default fallback and welcome intents!
- Create an intent (name doesn't matter but should reflect the topic of the autoreply)
- Provide example phrases in the Training phrases and one or more replies in the Responses section (see image below)
- Repeat steps 3-4 for every topic you want the bot to cover