Talk to your Wiro AI agent in Discord
Talk to your AI agent through your own Discord bot, in direct messages and in the server channels you allow.
Overview
What Discord does for your agent
Connects a bot you create in the Discord Developer Portal to the agent. People you list by their Discord user ID message the bot directly, and in the servers you add, the users or roles listed for that server mention it or reply to one of its messages in the channels you pick. It is the same agent as in Chat, with the same skills and connectors, and a connector action that asks first in Chat asks in the Discord conversation instead, where yes allows it once and no declines it.
The agent keeps its own connection to Discord's gateway, so there is no endpoint to set up. It asks Discord for two privileged intents, Message Content and Server Members, so both must be turned on for the bot, or Discord refuses the connection. Messages from people who are not on a list, and from other bots, get no reply.
Use cases
What your Wiro agent can do with Discord
- 01
An assistant in your moderators channel
List your moderators' role for a private moderation channel. A moderator mentions the bot to draft a warning, sum up a report someone pasted, or write this week's rules reminder, and the whole mod team sees the draft.
- 02
Announcements drafted from a few notes
Mention the bot in your staff channel with the facts of an update, such as a new event time or the changes in a patch, and it drafts a clear announcement for you to post in the right channel.
- 03
Bug reports turned into clear tickets
Testers with a listed role paste a messy bug report in the feedback channel and mention the bot. It rewrites the report with the steps to reproduce, what was expected and what happened, ready to file with the agent's connectors or by hand.
- 04
Approve the agent's actions from Discord
When a connector action asks first, such as sending an email or creating a calendar event, the agent asks in the Discord conversation and shows the whole request. Reply yes to allow it once or no to decline it.
- 05
Scheduled Task reports by direct message
A Scheduled Task, such as a weekly community summary or a daily check of open tickets, posts its report in Chat and then sends it to the people on the direct-message list, so they read it in Discord.
How it works
How Discord works with Wiro
- 01
Create the Discord bot
Make a bot of your own in Discord, then copy its token and the user IDs of the people who will talk to it.
- 02
Paste its token in the Channels tab
Open the agent's Channels tab, choose Discord, fill in what it asks for and save. It turns on by itself.
- 03
Talk to your agent there
Message the bot directly, or mention it in a server you listed. It is the same agent as in Chat, with the same skills and connectors.
- Where it runsThe agent keeps its own connection to Discord. Nothing to set up for incoming messages.
- Who can talk to itIn direct messages, the people you list by user ID. In a server you list, the people or roles listed for it, when they mention the agent or reply to it.
- Where its token is keptStored encrypted. Never send it in a chat.
@Harbor draft an announcement: tonight's event moves to Saturday at 8 pm UTC, same voice channel.
Here is a draft:
Tonight's event moves to Saturday. We start at 8 pm UTC in the same voice channel as before. Thanks for your patience, and see you there.
Setup
Set up Discord for your Wiro agent
Create the bot at Discord, then paste what the Channels tab asks for.
In the Discord Developer Portal, click New Application, give it a name, then open its Bot page.
On the Bot page, under Privileged Gateway Intents, turn on both Message Content Intent and Server Members Intent and save. With either off, Discord refuses the bot's connection and it answers nobody (Privileged Intents).
On the same page, click Reset Token and copy the bot token. Use this bot token, never your own Discord account's token, and never paste it into a chat.
On the Installation page, under Guild Install, add the
botandapplications.commandsscopes and at least View Channels, Send Messages, Read Message History, Embed Links and Attach Files. Open the Install Link and add the bot to your server.In Discord, open User Settings and turn on Developer Mode. Right-click a person and choose Copy User ID, the server icon for Copy Server ID, and a channel for Copy Channel ID.
In the agent's Channels tab, open Discord, paste the token into Discord Bot Token and add each person's User ID under Allowed Discord DM User IDs. You can also paste the Application ID from General Information into Discord Application ID.
For a server, add a row under Allowed Discord Servers with its Server ID, its Allowed Channel IDs, and the Allowed User IDs or Allowed Role IDs of who may use it. Copy a role's ID under Server Settings, Roles. Then Save: Discord turns on by itself, and a running agent restarts.
Send the bot a direct message, or mention it as
@YourBotin a listed channel or reply to one of its messages there.
What the Channels tab asks for
| Field | About |
|---|---|
| Discord Bot TokenRequired | Stored encrypted. |
| Discord Application IDOptional | Example: 123456789012345678. |
| Allowed Discord DM User IDsRequired | One per entry. |
| Allowed Discord ServersOptional | One row each, with Server ID, Allowed Channel IDs, Allowed User IDs (optional) and Allowed Role IDs (optional). |
For developers
Set up Discord from your own product
Your product can set up Discord for a customer's agent with your project's API key: send the values the Channels tab asks for to UserAgent under the credential key discord, in one request. It turns on once its required values are saved.
Questions
Discord and Wiro FAQ
What can an AI agent do in Discord?
It works as it does in Chat, through a Discord bot of your own. People you list message it directly, listed users or roles mention it in the channels you pick, and it answers with its own skills and connectors. A connector action that asks first asks in that conversation, and the agent sends its Scheduled Task reports to the people on the direct-message list.
How do I set up Discord for my agent?
Create an application in the Discord Developer Portal, turn on Message Content Intent and Server Members Intent on its Bot page, copy the token with Reset Token, and add the bot to your server from the Installation page. With Developer Mode on, copy the user, server and channel IDs, then paste the token and the IDs into the Discord card on the agent's Channels tab and save. Discord turns on by itself once Discord Bot Token and Allowed Discord DM User IDs are filled in.
Who can talk to the agent in Discord?
Only the people you list, by numeric Discord IDs, never by username. Allowed Discord DM User IDs covers direct messages. In a server, the agent answers in the channels listed for it, to the users or the holders of the roles listed there, when they mention the bot or reply to one of its messages, and a post of theirs that pings @everyone or @here counts as a mention too. Someone on the direct-message list can use the agent in a server only once you add them to that server's row or give them a listed role. Messages from anyone else, and from other bots, get no reply.
Why must both Message Content Intent and Server Members Intent be on?
The agent asks Discord for both when it connects: Message Content Intent to read what people write, and Server Members Intent to look up members and their roles. Discord refuses the connection of a bot that asks for an intent its settings do not turn on, so with either one off the agent answers nobody, direct messages included.
Can people send the agent files or voice messages in Discord?
Yes. The files people attach reach the agent with their message, and a voice message reaches it as text, unless the agent's Model Access rule blocks voice models.
Does Discord cost extra on an agent plan?
No. Discord is included in every agent plan and changes no price, and the agent's AI usage in Discord counts the same as in Chat. When the plan's included usage and the balance are used up, the agent replies with a short note saying so instead of an answer.
What should I check when the bot doesn't answer in Discord?
First check that Message Content Intent and Server Members Intent are both on, on the bot's Bot page in the Developer Portal: with either off, Discord refuses the connection. A stopped agent answers nobody too, so check that it is running, that the sender's User ID is on the right list or holds a listed role, that the channel is under that server's Allowed Channel IDs, and that the message mentions the bot or replies to it. In that channel, the bot needs View Channels, Send Messages and Read Message History.
How do I stop the agent in Discord?
Clear the Discord card's fields in the agent's Channels tab and save, and the agent stops answering there; filling in the required fields again turns Discord back on. If the token leaked, click Reset Token on the bot's Bot page and paste the new token into Discord Bot Token: the old one stops working.
Access and limits
Discord access and limits
- Revoke access
To take the agent off Discord, clear the Discord card's fields in the agent's Channels tab and save; filling in the required fields again turns it back on. If the token leaks, click Reset Token on the bot's Bot page: the old token stops working, so paste the new one into Discord Bot Token and save.
- Limits
A Discord message holds up to 2,000 characters, so the agent sends a longer answer as several messages. A bot in 100 or more servers needs Discord's verification, and Discord has to approve its privileged intents before it can use them.
In a server, the agent answers only in the channels listed in that server's row, and a row needs at least one channel and at least one user or role. There, a post that pings @everyone or @here from someone the row lists, by user or by role, counts as a mention, so the agent answers it too.
Related channels
More channels for your Wiro agent
Twilio Voice
Your AI agent answers calls to your Twilio phone numbers and sums up each call in Chat afterwards.
Telegram
Talk to your AI agent through your own Telegram bot, in direct messages and in the groups you allow.
Slack
Talk to your AI agent in Slack, in direct messages and in the channels you allow, through a Slack app of your own.
Put Discord to work with Wiro
Deploy an agent and set up Discord in its Channels tab. Every agent plan includes it: Starter $5, Pro $30 and Max $100 a month.