Discord Bot
Connect your Discord bot to Fainflow to automate messaging and events in Discord servers.
Step 1 — Create a Discord Application and Bot
- Open the Discord Developer Portal and log in.
- Click New Application, enter a name, and click Create.
- In the left sidebar, click Bot.
- Click Add Bot → Yes, do it!
- Under the bot's username, click Reset Token → Yes, do it! and copy the token.
⚠️ Keep the token secret. Anyone with the token can control your bot. Never commit it, never share it. If it leaks, reset it in the Developer Portal immediately.
Step 2 — Enable the MESSAGE_CONTENT Intent
Without this, your bot cannot read message text in servers.
- In the Developer Portal, open your application → Bot.
- Scroll down to Privileged Gateway Intents.
- Enable Message Content Intent.
- Click Save Changes.
ℹ️ If your bot is in 100+ servers, Discord requires you to apply for this intent. For development and small bots it is granted automatically.
Step 3 — Connect in Fainflow
- In Fainflow, open Connections → click + New Connection → choose Discord Bot.
- Fill the form:
| Field | Description |
|---|---|
| Bot Token | Token from the Developer Portal (Step 1.5) |
| Name | Any label you want to see in Fainflow (e.g. Support Bot) |
| Description | Short purpose, e.g. Customer support automation |
⚠️ The real bot is determined by the token, not the Name.
Nameis just a label inside Fainflow. After saving, the connection card shows the actual@usernameFainflow detected — make sure that matches the bot you intend to use.
- Click Connect.
Fainflow validates the token by calling Discord's GET /users/@me, saves your bot's username and application_id. On success you see Bot connected! with the bot's username and an Invite bot to server button. This button is shown only on that success screen — copy the invite link if you want to reuse it later (see Step 4 for how to rebuild it).
Step 4 — Invite the Bot to a Server
Right after connecting, Fainflow shows an Invite bot to server link on the success screen. Click it to open Discord's OAuth2 authorization page and add the bot to any server you manage.
If you closed that screen, build the link yourself — replace APPLICATION_ID with your application's ID from the Developer Portal (General Information → Application ID):
https://discord.com/oauth2/authorize?client_id=APPLICATION_ID&scope=bot%20applications.commands&permissions=274877975552
The invite link grants bot and applications.commands scopes with standard permissions. You can customize permissions after adding the bot via Server Settings → Roles.
Step 5 — Verify the Connection
After saving, open the connection card in Connections:
- Bot Username — the username Fainflow detected via the Discord API
- Bot Token — masked (only the first 8 characters visible)
Use the Test connection button to verify the bot token is still valid.
Step 6 — Rotate the Token / Edit the Connection
You can change the bot token without deleting the connection — all attached flows keep working.
- Open Connections → click the connection card.
- Next to the masked Bot Token, click Edit.
- Fill any combination:
- New Bot Token — leave empty to keep current. Paste a new one to rotate.
- Name — display name in Fainflow.
- Description — short purpose.
- Click Save.
If you provided a new token, Fainflow re-validates it through Discord and refreshes bot_username and application_id. Saving fails if Discord rejects the token, so a bad paste cannot break the connection.
💡 When to rotate? If your token was exposed, reset it in the Developer Portal, then paste the new token here and Save. No need to recreate the connection or rebuild flows.
Troubleshooting
| Symptom | Cause / Fix |
|---|---|
Invalid bot token — Discord rejected it | Token is wrong, copied with extra spaces, or was reset. Get a fresh one from the Developer Portal. |
| Bot doesn't receive message text | MESSAGE_CONTENT intent is not enabled. Go to Developer Portal → your app → Bot → Privileged Gateway Intents → enable Message Content Intent. |
4014 Disallowed intents error in logs | Same as above — the intent is not enabled for your application. |
| Bot was invited but doesn't respond | Check that the bot has the correct permissions in the server. Re-invite with the invite link from Step 4 to apply the default permission set. |
| Connection name is wrong | The Name field is just a label inside Fainflow. The actual bot is determined by the token. Open the connection card and check the Bot Username — that's the real bot. |