Skip to main content

At a glance

Credentials

Set these per environment. See Connect an integration.
VariableRequiredDescription
DISCORD_BOT_TOKENYesDiscord bot token from the Bot tab of your application in the Discord Developer Portal Docs.

Setup

  1. Create a Discord application: Go to https://discord.com/developers/applications, sign in with any Discord account (free), and click New Application. For testing, create your own free Discord server first so you have a safe place to invite the bot.
  2. Get the bot token: Open your application’s Bot tab and click Reset Token to reveal the bot token. Copy it immediately (it is shown once) and set it as DISCORD_BOT_TOKEN. Resetting again invalidates the previous token.
  3. Enable privileged intents: On the Bot tab, under Privileged Gateway Intents, enable Message Content Intent. Without it, the content field of most messages returned by the API is empty for the bot. Enable Server Members Intent too if you need member data.
  4. Invite the bot to your server: In OAuth2 > URL Generator, select the bot scope, then grant permissions such as View Channels, Send Messages, Read Message History, Add Reactions, and Create Public Threads. Open the generated URL in a browser and add the bot to your server (requires Manage Server permission there).
  • The bot can only see and post in servers it has been invited to and channels its role can access.
  • Message content in API responses is empty unless the Message Content privileged intent is enabled (bots in fewer than 100 servers can enable it directly in the portal).
  • Discord rate limits per route; bulk reads should page with before/after cursors rather than tight loops.
Provider API reference: https://discord.com/developers/docs/reference

Tools

ToolAccessDescription
Get Bot UserReadGet the bot’s own user account to confirm the token works and learn the bot’s ID and username
List GuildsReadList the servers (guilds) the bot has been added to, so an agent can find a guild ID
List Guild ChannelsReadList the channels in a server so an agent can find the right channel ID before reading or posting
Get Channel MessagesReadRead recent messages from a channel for summaries, support triage, or context before replying
Send MessageWritePost a message to a channel, optionally as a reply to an existing message
Create DM ChannelWriteOpen (or return the existing) direct-message channel with a user; use the returned channel ID with Send Message to DM the user
Edit MessageWriteEdit the text of a message the bot previously sent, e.g. to update a status post or correct an announcement
Search Guild MembersReadFind members of a server whose username or nickname starts with a string, e.g. to resolve a name to a user ID for mentions or DMs
Add ReactionWriteReact to a message with an emoji, e.g. to acknowledge or label it
Create ThreadWriteStart a thread from an existing message to keep a discussion organized

Example prompts

  • Read the latest messages in our Discord support channel and summarize the main topics and any unanswered questions.
  • Post a release announcement to our Discord announcements channel.
  • Find recent questions in our Discord server, react to the ones already handled, and start a thread for the most important open one.