Discord integration

Discord Bot API: messages, channels, guilds, members, reactions

Help CentreConnectors

Overview

Discord is a chat platform – guilds (servers), channels, messages, threads, members, roles, webhooks. The Automize Discord connector wraps the Discord Bot API for automation: posting messages, managing members, moderating channels.

  • Regions: Discord is a single global platform – discord.com/api/v10.
  • Plans: Free. Bot apps have unlimited usage subject to rate limits.

Setting up the connection

Auth type: API Key.

  1. Go to discord.com/developers/applications → New Application.
  2. Bot section → Reset Token → copy the bot token (starts with MTI... or similar).
  3. Enable required Privileged Gateway Intents (Server Members + Message Content if needed).
  4. OAuth2 → URL Generator → pick scopes (bot, applications.commands) + bot permissions → use the URL to invite the bot to a guild.
  5. In Automize, open Settings → Connectors → Discord → Add connection. Paste the bot token. Connector sends as 'Bot <token>' header.

Find your credentials at https://discord.com/developers/applications.


Rate limits

Discord enforces per-route rate limits (returned in X-RateLimit-* headers). Per-guild Send Message ~5/sec. Global ~50/sec per bot. Connector reads these + backs off.


Data model

Discord's primitives:

    Guild (server) ─┬─ Channels (text, voice, forum, thread)
                    │     ├─ Messages ─── Reactions
                    │     └─ Threads
                    ├─ Members ─── Roles
                    ├─ Webhooks (channel-attached, no-auth post-only)
                    └─ Emoji + Stickers

Available operations

22 operations available. Click any row to jump to its detail.

OperationCategoryWhat it does
Add reactionGeneralAdd a reaction to a Discord message.
Add role to memberGeneralAdd a role to a Discord guild member.
Ban memberGeneralBan a member from a Discord guild.
Bulk delete messagesGeneralBulk delete messages in a Discord channel.
Create channelGeneralCreate a Discord channel in a guild.
Create ThreadGeneralCreate a thread from a message
Create WebhookGeneralCreate a channel webhook
Delete channelGeneralDelete a Discord channel.
Delete messageGeneralDelete a Discord message.
Edit messageGeneralEdit a Discord message.
Execute WebhookGeneralSend a message via webhook
Get channelGeneralGet a Discord channel by ID.
Get current userGeneralGet the current Discord user.
Get guildGeneralGet a Discord guild (server) by ID.
Get messageGeneralGet a Discord message by ID.
List channelsGeneralList channels in a Discord guild.
List membersGeneralList members of a Discord guild.
List messagesGeneralList messages in a Discord channel.
List RolesGeneralList roles in a guild
Pin messageGeneralPin a message in a Discord channel.
Remove role from memberGeneralRemove a role from a Discord guild member.
Send messageGeneralSend a message to a Discord channel.

Operations

Add reaction

Add a reaction to a Discord message.

ParameterRequiredTypeDescription
Channel Id channel_idYestext
Message Id message_idYestext
Emoji emojiYestext

Tips

  • emoji: unicode emoji (👍) or custom (name:id). Custom needs URL encoding.

Add role to member

Add a role to a Discord guild member.

ParameterRequiredTypeDescription
Guild Id guild_idYestext
User Id user_idYestext
Role Id role_idYestext

Tips

  • guild_id + user_id + role_id. Bot's highest role must be above the target role.

Ban member

Ban a member from a Discord guild.

ParameterRequiredTypeDescription
Guild Id guild_idYestext
User Id user_idYestext

Tips

  • Permanent ban. delete_message_seconds: also wipes their recent messages (0-604800 = 7 days).

Bulk delete messages

Bulk delete messages in a Discord channel.

ParameterRequiredTypeDescription
Channel Id channel_idYestext
Messages messagesNotext

Tips

  • Up to 100 message IDs in one call. Messages must be <14 days old (Discord limit).

Create channel

Create a Discord channel in a guild.

ParameterRequiredTypeDescription
Guild Id guild_idYestext
Name nameYestext
Type typeNotext
Topic topicNotext
Parent Id parent_idNotext

Tips

  • type: 0 (text), 2 (voice), 4 (category), 5 (announcement), 15 (forum).

Create Thread

Create a thread from a message

ParameterRequiredTypeDescription
Channel Id channel_idYestext
Message Id message_idYestext
Name nameYestext
Auto Archive Duration auto_archive_durationNotext

Tips

  • Threads forked from a message. auto_archive_duration: 60, 1440, 4320, 10080 (minutes).

Create Webhook

Create a channel webhook

ParameterRequiredTypeDescription
Channel Id channel_idYestext
Name nameYestext

Tips

  • Channel-bound. Webhooks can post without bot auth – useful for cross-system notifications.

Delete channel

Delete a Discord channel.

ParameterRequiredTypeDescription
Channel Id channel_idYestext

Tips

  • Hard-delete. Channel + all messages gone.

Delete message

Delete a Discord message.

ParameterRequiredTypeDescription
Channel Id channel_idYestext
Message Id message_idYestext

Tips

  • Own messages always. Others' need Manage Messages permission.

Edit message

Edit a Discord message.

ParameterRequiredTypeDescription
Channel Id channel_idYestext
Message Id message_idYestext
Content contentYestext
Embeds embedsNotext

Tips

  • Only own bot's messages can be edited. content + embeds replaced wholesale.

Execute Webhook

Send a message via webhook

ParameterRequiredTypeDescription
Webhook Id webhook_idYestext
Webhook Token webhook_tokenYestext
Content contentYestext
Embeds embedsNotext
Username usernameNotext

Tips

  • POST to a webhook URL with content + embeds. No bot rate limits – webhooks have their own (5/sec per webhook).

Get channel

Get a Discord channel by ID.

ParameterRequiredTypeDescription
Channel Id channel_idYestext

Tips

  • Returns channel metadata.

Get current user

Get the current Discord user.

No input parameters.

Tips

  • Returns the bot's own user. Useful for verification.

Get guild

Get a Discord guild (server) by ID.

ParameterRequiredTypeDescription
Guild Id guild_idYestext

Tips

  • Returns guild metadata. with_counts=true for member counts.

Get message

Get a Discord message by ID.

ParameterRequiredTypeDescription
Channel Id channel_idYestext
Message Id message_idYestext

Tips

  • channel_id + message_id.

List channels

List channels in a Discord guild.

ParameterRequiredTypeDescription
Guild Id guild_idYestext

Tips

  • Returns channels in a guild – text, voice, forum, categories.

List members

List members of a Discord guild.

ParameterRequiredTypeDescription
Guild Id guild_idYestext

Tips

  • guild_id. Requires Server Members Intent enabled.
  • Pages via after (snowflake ID).

List messages

List messages in a Discord channel.

ParameterRequiredTypeDescription
Channel Id channel_idYestext

Tips

  • Pages via before/after/around message IDs. Limit max 100.

List Roles

List roles in a guild

ParameterRequiredTypeDescription
Guild Id guild_idYestext

Tips

  • Returns all roles + their permissions + positions.

Pin message

Pin a message in a Discord channel.

ParameterRequiredTypeDescription
Channel Id channel_idYestext
Message Id message_idYestext

Tips

  • Pins a message in a channel. Max 50 pinned per channel.

Remove role from member

Remove a role from a Discord guild member.

ParameterRequiredTypeDescription
Guild Id guild_idYestext
User Id user_idYestext
Role Id role_idYestext

Tips

  • Same permission requirement as Add Role.

Send message

Send a message to a Discord channel.

ParameterRequiredTypeDescription
Content contentYestextarea
Embeds embedsYestext
Tts ttsYestext
Channel Id channel_idYestext

Tips

  • channel_id + content (text up to 2000 chars).
  • embeds[]: rich embed objects for cards. tts=true for text-to-speech.
  • components[]: buttons + select menus (Interactions feature).

Errors

  • Missing Access – Bot not in the guild or lacks View Channel permission.
  • Cannot send messages to this user – DM channel – user has DMs disabled or you're not in a shared guild.

FAQ

Bot needs to be in a guild to act – how?
Use the OAuth2 URL Generator to create an invite URL with scope=bot + the permissions you need. A guild admin opens that URL + adds your bot.
Why does my Send Message fail with 'Cannot send messages'?
Either bot lacks Send Messages permission on that channel, the channel is read-only, or you hit a 50007 (cannot DM user).
Webhook vs bot – when?
Webhook: simple incoming notifications, no bot needed, channel-bound. Bot: interactive, can read messages, react, moderate, multi-channel. Webhooks are simpler if you just want one-way notifications.
Message Content Intent – why?
To read users' message content, your bot must declare Message Content Intent (privileged intent – verified bots need approval). For pure outbound bots, not needed.

Related connectors

See it working on your own data

Everything documented here ships with the platform – try the document tools free, or go live in 7 days.