- Discord App
- Voiceflow Chat Assistant project
Go to to https://discord.com/developers/applications to create your Discord app
Name your application and click “Create”
From the General Information tab, copy the APPLICATION ID and save it for later
On the Bot tab, generate a Token by clicking on Reset Token button
Copy the newly created token and save it for later
Scroll down and toggle PRESENCE INTENT, SERVER MEMBERS INTENT and MESSAGE CONTENT INTENT. Do not forget to save your changes.
Now, on the OAuth2 tab, select bot for the SCOPES and give the BOT PERMISSIONS you need.
Once it’s done, click the Copy button at the bottom of the page.
Open this link in a new tab and add the bot to your Discord server
On your Discord server you should now see the bot in the Users tab and a new message
If you haven’t activated the Developer Mode already, do it by going to the settings: APP SETTINGS > Advanced
Right click on your server icon in the left sidebar, click on Copy Server ID and save it for later.
You should now have: an app key a bot token a server id
Go to Voiceflow Creator and open the Chat Assistant project you want to use. Click on Integration from the left sidebar (or press the 6 key)
Select the Dialog API integration, click Copy API Key to copy your Voiceflow Dialog API Key and save it for later
Rename the .env.template file to .env in your directory
DISCORD_TOKEN Discord bot token
APP_ID Discord App ID
SERVER_ID Discord server ID
VOICEFLOW_API_URL Voiceflow Dialog API endpoint (default to general runtime)
VOICEFLOW_API_KEY Voiceflow project API key (from the Integration section)
VOICEFLOW_VERSION_ID Voiceflow project version ID (only for transcripts, default to 'development')
VOICEFLOW_PROJECT_ID Voiceflow project ID (only for transcripts)
LIVEANSWERS_CHANNELS A list of the channels where the bot will be active (comma separated)
THREADS Set if you want to use threads for the answer or not (default to true)
In the root of your directory, run the following command to install the dependencies and run the app
npm start
Here is a loom video showing the setup of the Discord bot and the Voiceflow project.