Discord (NEW)

To integrate Discord with your Voiceflow project, you will need to follow the same steps as shown in the quick start section. In short, in the admin panel, you will need to:

  1. Create a Client Company

  2. Create a Voiceflow Project and associate the Voiceflow project to the Client Company

  3. Create a Client Integration and associate the Client Company & Voiceflow Project to the integration

Discord Bridge Server

To use Discord as an integration channel, we created a dedicated Bridge Application. This is because Discord does not operate through HTTP requests, but WebSockets. To enable communications between Discord and FlowBridge we need to have a server listening to all the changes on the discord server and forward them to your FlowBridge environment.

You can read more on the repository: https://github.com/FlowBridge/flowbridge-discord-bridge

Or directly download the flowbridge-discord-bridge PHAR file on the releases page: https://github.com/FlowBridge/flowbridge-discord-bridge/releases

The entire project is open source so you can tweak and adjust it to your personal needs!

Discord Bot Setup

  1. Create a new application or select an existing one

  2. Go to Bot section and create a bot

  3. Copy the bot token to your `.env` file

  4. Enable Privileged Gateway Intents:

    1. MESSAGE CONTENT INTENT

    2. SERVER MEMBERS INTENT

  5. Go to OAuth2 > URL Generator:

    1. Select scopes: `bot`, `applications.commands`

    2. Select permissions: `Send Messages`, `Read Message History`, `View Channels`

  6. Use the generated URL to invite the bot to your server

FlowBridge Setup

  1. Login to your FlowBridge environment

  2. Create a new integration and associate it with a Voiceflow Project and Client Company

  3. Select "Discord" from the integration channels

  4. Paste the Discord Bot Token from the previous step during the Discord Integration creation process

  5. Click create

  6. On the view integration page (which you automatically go to after creation), you see a button on the top right named "Integration Info"

    1. Within the popup, you can find the tenant URL and integration ID required inside the .env file

Running the Discord Bridge

Docker Deployment through Docker Compose (Easiest)

You can use the Docker Hub hosted version of the bridge to easily host it somewhere. Below is docker hub repository, and an example docker-compose.yml file Save this as docker-compose.yml

Remember to fill in the environment variables as needed.

You can now use the docker compose command to run the server: docker compose up

Running through PHP directly

For information on the specifics of running the Discord Bridge, check out the README file located inside the /builds directory of the repository: https://github.com/FlowBridge/flowbridge-discord-bridge/tree/main/builds

In short, you need to:

  1. Download the flowbridge-discord-bridge file from the ./builds directory OR from the Releases page

  2. You also need to download the .env.example file, rename it to .env and keep it within the same directory as the flowbridge-discord-bridge file.

  3. Edit the values in .env to contain the discord bot token as well as the integration information of your flowbridge environment

  4. Now, open a terminal, and run php flowbridge-discord-bridge (PHP must be installed on the device)

  5. Your bot is now running as long as the flowbridge-discord-bridge server remains alive!

Customizing the Discord Bridge

The discord Bridge application is fully open source. This means you can customize it completely to your needs. It is built on top of Laracord a PHP based framework built on top of Laravel Zero built specifically for Discord Bot usage.

If you want more information on the specifics on how to customize and build upon the bridge application, check out the Laracord Documentation at https://laracord.com/

Last updated