A Discord chat bot is a bot user that can receive and respond to private messages, as well as channel messages that specifically mention or reply to the bot user. In order to connect a flow function with a Discord chat bot, you will need a discord_token
.
- Go to the Discord Developer Portal and log in.
- Click on the "New Application" button and give your bot a name.
- Next, on the application details page, you can update the app icon, description, tags etc.
- Click on the "Bot" tab on the left panel.
- Click the "Reset Token" button to get the
discord_token
. Write down the token and keep it safe! - Turn on the "PRESENCE INTENT", "SERVER MEMBERS INTENT", and "MESSAGE CONTENT INTENT" settings.
- Click the "Reset Token" button to get the
- Click on the "OAuth" tab on the left panel
- Click on "URL Generator".
- Select the "bot" scope.
- Select the "administrator" permission (or select message reading and sending permissions individually as you need).
- Get the bot URL from the GENERATED URL in the bottom of this page.
- Finally, use the bot URL from the last step to invite the bot into any of your Discord servers.
Once you connect a flow function to the bot (via the discord_token
), all users in the Discord server will be able to message the bot and mention / reply to it in channels.