Skip to main content

Discord

Post, edit and read Discord messages as a bot; open threads, react, and moderate server members.

Connect a Discord bot to work in your servers end to end: send, edit, pin, react to and delete messages, DM a user, open threads, read a channel's recent history, list servers, channels and members, and ban or unban members.

Connect

Credential fieldRequiredWhere it comes from
Bot token (BOT_TOKEN)YesFrom discord.com/developers/applications → your app → Bot → Reset Token. Identifies and authenticates the bot; Discord shows it only once.
SettingRequiredWhat it is
Default channel (DEFAULT_CHANNEL_ID)NoChannel id used when a tool call omits channelId - handy for notify-style automations that always post to the same place.
Default server (DEFAULT_GUILD_ID)NoServer (guild) id used when a tool call omits guildId, for the channel, member and ban tools.

Tools

ToolAccessWhat it does
Bot identity (yekar.discord.get-me)ReadThe connected bot's identity - username, application name and id - plus which privileged intents it has: canReadMessageContent false means Read messages returns EMPTY text, and canListMembers false means List members will be refused. Both are toggled in the Developer Portal under Bot → Privileged Gateway Intents.
List servers (yekar.discord.list-guilds)ReadThe Discord servers (guilds) the bot has been added to, with their ids - the starting point for finding a channel id. A server the bot was never invited to never appears here.
List channels (yekar.discord.list-channels)ReadThe channels in a server, with the ids every other tool addresses by - name, kind, and whether a message can be posted there. This is how you turn a #channel name into a channel id. Only channels the bot can view are returned.
Get channel (yekar.discord.get-channel)ReadA channel's details - name, kind, topic, the server it belongs to, and whether messages can be posted to it. Use it to confirm a channel id addresses what you think it does before writing to it.
Read messages (yekar.discord.list-messages)ReadRecent messages in a channel, newest first, with author, text and timestamps; pages backwards via beforeMessageId. The bot needs View Channel and Read Message History there. If the app lacks the Message Content intent, Discord returns messages with EMPTY text (except the bot's own and ones mentioning it) - this tool says so instead of reporting a silent channel.
List members (yekar.discord.list-members)ReadMembers of a server, ordered by user id, with the ids the moderation tools address by. Requires the Server Members privileged intent (Developer Portal → your app → Bot); without it Discord refuses the request - Bot identity reports whether it is on.
Send message (yekar.discord.send-message)WritePost a message to a channel or thread the bot can write to. Supports Discord markdown, replying to a message, and silent delivery. By default only real @user mentions ping - @everyone, @here and role pings need mentions:'all'.
Send direct message (yekar.discord.send-dm)WriteSend a private message to one user. Discord only allows this when the bot shares a server with them AND they accept DMs from server members - otherwise it is refused, and no amount of permissions changes that.
Edit message (yekar.discord.edit-message)WriteReplace the text of a message the bot itself sent. Discord never lets a bot edit anyone else's message, whatever its permissions. The new text replaces the old one entirely.
Delete message (yekar.discord.delete-message)WriteDelete a message. The bot can always delete its own; deleting someone else's needs the Manage Messages permission in that channel. Deletion is permanent and there is no undo.
Add reaction (yekar.discord.add-reaction)WriteReact to a message as the bot - the lightweight acknowledgement (✅ on a handled request, 👀 on one in progress) that doesn't add a message to the channel. Needs Add Reactions in that channel.
Pin message (yekar.discord.pin-message)WritePin a message to the top of its channel. Needs the Manage Messages permission there. A channel holds at most 50 pins - Discord refuses the 51st.
Unpin message (yekar.discord.unpin-message)WriteRemove a message from its channel's pins. Needs the Manage Messages permission there. The message itself stays in the channel - only the pin is removed.
Create thread (yekar.discord.create-thread)WriteOpen a public thread in a channel - either hanging off an existing message, or standalone. Use the returned threadId as a channelId to post into it. Needs Create Public Threads in the parent channel.
Ban member (yekar.discord.ban-member)WriteBan a user from a server, optionally purging their recent messages. Needs the Ban Members permission, and the bot's highest role must sit above the target's. A ban persists until Unban member - the user cannot rejoin meanwhile.
Unban member (yekar.discord.unban-member)WriteLift a server ban so the user may rejoin. Needs the Ban Members permission. It does NOT re-add them or restore their roles - it only removes the block, and they have to accept an invite themselves.

Notes

  • Create an app at discord.com/developers/applications, open Bot, and paste the token from Reset Token to connect - every tool acts as that bot.
  • Under Bot → Privileged Gateway Intents, turn on Message Content (otherwise Read messages returns empty text) and Server Members (otherwise List members is refused).
  • Invite the bot to each server from Installation or OAuth2 → URL Generator with the bot scope, plus the permissions you need: View Channels and Read Message History to read, Send Messages to post, Manage Messages to pin or delete, Ban Members to moderate.
  • Find ids with List servers and List channels - Discord ids are 17–20 digit numbers, never a #name. (In the app: Settings → Advanced → Developer Mode, then right-click → Copy Channel ID.)
  • Optionally set the Default channel and Default server properties so automation steps can omit ids entirely.