Skip to main content

At a glance

Credentials

Set these per environment. See Connect an integration.

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

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.