Discord
Authentication: bot token. See Magic Link for the runtime auth flow.
Sample use cases
- Summarize the last 24 hours of messages in the
#supportchannel - Post the weekly release notes to
#announcementsand pin the message - Open a thread on a bug report message and add the on-call engineer to it
Available Tools
List every channel and category in a server. This is the tool to call first to find channel IDs for the message…
Fetch one channel or thread by ID, including its permission overwrites and, for forum channels, the available_tags…
Create a channel in a server. Requires the Manage Channels permission. Use list_guilds for server IDs and…
Modify a channel or thread: rename it, change its topic, slowmode, category, or voice settings, or archive and lock…
Delete a channel, or delete a thread. Requires Manage Channels, or Manage Threads for a thread. Deleting a category…
Set a role’s or member’s permission override on a channel, using permission names rather than raw bitfields. Call…
Remove a role’s or member’s permission override from a channel, so they fall back to the category and server…
Show the bot’s typing indicator in a channel for about 10 seconds. Use before a slow operation so users know a reply…
Follow an announcement channel so its published messages are crossposted into one of your own channels. The source…
List the servers the bot has been added to. This is the tool to call first; almost every other tool needs a server…
Fetch one server’s settings by ID. Use list_guilds to find server IDs. Set with_counts true for approximate member…
Read a server’s audit log to see who performed moderation and configuration actions. Requires the View Audit Log…
List a server’s custom emojis. Call this before create_reaction to get each emoji’s reaction_format (‘name:id’)…
List every active invite for a server, with use counts and expiry. Requires the Manage Guild permission. Use…
List the active invites pointing at one channel. Requires the Manage Channels permission. Use list_guild_channels…
Look up an invite by its code to see which server and channel it leads to. Pass just the code, not the full…
Create an invite link to a channel. Requires the Create Instant Invite permission. Use list_guild_channels for…
Revoke an invite so it can no longer be used. Requires Manage Channels on the channel, or Manage Guild for any…
List a server’s members in ID order. Requires the Guild Members privileged intent, enabled on the Bot tab of your…
Find server members whose username or nickname starts with a string. This is a prefix match, so ‘ali’ finds ‘alice’…
Fetch one member’s server profile: nickname, roles, join date, and timeout state. Use search_guild_members to find…
Change a member’s nickname, roles, voice state, or timeout. Each field needs its own permission (Manage Nicknames…
Kick a member from a server. Requires the Kick Members permission. A kicked member can rejoin with a new invite; use…
Give a member one role, leaving their other roles alone. Requires Manage Roles, and the role must sit below the…
Take one role away from a member, leaving their other roles alone. Requires Manage Roles, and the role must sit…
Change the bot’s own nickname or bio in a server. This is the only way to do that: update_guild_member targets…
Read a channel’s or thread’s message history, newest first. Use this to browse recent messages; use search_messages…
Fetch one message by ID, including its reaction tallies. Use list_messages or search_messages to find message IDs…
Post a message to a channel, thread, or DM channel. Requires at least one of content, embeds, sticker_ids, poll, or…
Edit a message the bot itself sent. Content and embeds of another user’s message cannot be edited by any token. Use…
Permanently delete one message. Deleting another user’s message requires the Manage Messages permission. Use…
Delete 2 to 100 messages from a guild channel in one call. Every message must be under 2 weeks old and every ID…
Search a server’s messages by content, channel, author, mentions, or attachment type. Use this to find messages…
Publish a message from an announcement channel to every server following it. Only works in channels of type 5; use…
List a channel’s pinned messages, most recently pinned first. Each entry carries the pin time and the full message…
Pin a message in its channel. Requires the Pin Messages permission. A channel holds at most 50 pins. Use…
Remove a message from its channel’s pins. Requires the Pin Messages permission. The message itself is not deleted…
List a server’s bans, each with the banned user and the reason recorded. Requires the Ban Members permission. Use…
Check whether one user is banned from a server, and read the recorded reason. Requires the Ban Members permission…
Ban a user from a server, optionally deleting their recent messages. Requires the Ban Members permission. The user…
Lift a server ban so the user can be invited back. Requires the Ban Members permission. This does not re-add them to…
React to a message as the bot. Pass a standard emoji character, or ‘name:id’ for a custom server emoji; use…
Remove the bot’s own reaction from a message. To remove another user’s reaction use delete_user_reaction, or…
Remove one specific user’s reaction from a message. Requires the Manage Messages permission. Use list_reactions to…
List the users who reacted to a message with a given emoji. Use get_message first to see which emojis are on the…
Clear reactions from a message. Pass an emoji to clear just that one, or leave it null to clear every reaction…
List every Discord permission name, with its bit and what it allows. Call this before create_role, update_role, or…
List a server’s roles, each with its permissions decoded into names. Call this to find role IDs for add_member_role…
Fetch one role by ID, with its permissions decoded into names. Call this before update_role to read the current…
Create a role in a server. Requires the Manage Roles permission. Pass permissions as names, e.g. [‘VIEW_CHANNEL’…
Modify a role’s name, colour, or permissions. Requires Manage Roles, and the role must sit below the bot’s own…
Delete a role from a server. Requires Manage Roles, and the role must sit below the bot’s own highest role. Every…
Start a thread attached to an existing message, so the thread appears under it. Requires Create Public Threads. Use…
Open a thread in a text channel, or a post in a forum or media channel. In a forum or media channel the message…
List every thread in a server that is not archived, across all channels. Use list_guilds to find server IDs, and…
List archived threads under a channel, most recently archived first. Set visibility to ‘public’ or ‘private’…
List the users who have joined a thread. Use list_active_threads to find thread IDs. Requires the Guild Members…
Add a user to a thread. The bot must be able to see the thread, and the user must be a member of the server. Use…
Remove a user from a thread. Requires Manage Threads, unless the thread is private and the bot created it. Use…
Fetch the account the credential authenticates as, which for a bot token is the bot itself. Use this to learn the…
Fetch a user’s global Discord account by ID. Use search_guild_members to find user IDs, or read author.id from…
Open a direct message channel with a user, or return the existing one. Use search_guild_members to find user IDs…
List the webhooks configured on a channel, including each one’s token. Requires the Manage Webhooks permission. Use…
Create a webhook on a channel so an external system can post to it without a bot token. Requires the Manage Webhooks…
Delete a webhook, immediately breaking anything posting through it. Requires the Manage Webhooks permission. Use…
Post a message through a webhook, optionally under a custom name and avatar. Use create_message to post as the bot…