Skip to main content
Glama

unpin_message

Remove a pinned message from a Discord text channel to manage pinned content and keep channels organized.

Instructions

Unpin a message in a text channel.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
channel_idYes
message_idYes
reasonNo

Implementation Reference

  • The handler implementation for the 'unpin_message' tool. It acquires the Discord bot client, ensures the channel and message exist, then calls the message.unpin() method with an optional reason.
    async def unpin_message(channel_id: str | int, message_id: str | int, reason: str | None = None, ctx: Context = None) -> str: # type: ignore[override] """Unpin a message in a text channel.""" assert ctx is not None bot, _ = await _acquire(ctx) channel = await _ensure_channel(bot, _require_int(channel_id, "channel_id")) message = await _fetch_message(channel, _require_int(message_id, "message_id")) await _call_discord("unpin message", message.unpin(reason=reason)) return f"Unpinned message {message.id} in channel {channel.id}."
  • The @server.tool() decorator registers the unpin_message function as an MCP tool with the name 'unpin_message'.
    async def unpin_message(channel_id: str | int, message_id: str | int, reason: str | None = None, ctx: Context = None) -> str: # type: ignore[override]

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/wowjinxy/mcp-discord'

If you have feedback or need assistance with the MCP directory API, please join our Discord server