Plugins
Discord
Connect a Discord bot for messages, roles, and voice channel events.
Discord
The Discord plugin connects a Discord bot via the Gateway for message, role, and voice events, plus handlers to send messages and manage roles.
Setup
- Create an application in the Discord Developer Portal.
- Under Bot, create a bot user and copy the bot token.
- Enable privileged intents:
- Message Content Intent (required for message text)
- Server Members Intent (required for role add/remove detection)
- Open Plugins → Discord in Stream Kit.
- Paste the bot token and click Connect.
- Optional: set
DISCORD_CLIENT_IDinplugins/discord/src/config.ts(monorepo builds), then use Invite bot to server to add the bot with the right permissions. - Confirm status shows Connected.
Requirements
- Discord application with a bot user
- Bot token
- Privileged intents: Message Content, Server Members
- Bot invited to at least one server (Gateway will list guilds after connect)
The plugin reports configured when a bot token is saved. Triggers and handlers require an active Gateway connection.
Features
| Area | Capabilities |
|---|---|
| Message | Message received trigger, send message handler |
| Role | Role added / removed triggers, add / remove role handlers |
| Voice | Voice join, leave, and move triggers |
Triggers and handlers
Example trigger IDs
| Trigger | ID |
|---|---|
| Message received | discord:discord:message:message-received |
| Role added | discord:discord:role:role-added |
| Voice join | discord:discord:voice:voice-join |
Invite helper
Invite bot to server opens Discord’s bot authorize URL (OAuth scope=bot) with permissions for viewing channels, sending messages, managing roles, and reading message history. A local redirect (port 9004) confirms the invite; the bot token is still what authenticates the Gateway.