Skip to main content
Glama

pin_message

Pin important messages in Discord text channels to keep them visible at the top for easy reference by all members.

Instructions

Pin a message in a text channel.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
channel_idYes
message_idYes
reasonNo

Implementation Reference

  • The handler function that implements the 'pin_message' MCP tool. It fetches the channel and message using Discord.py and calls message.pin(reason=reason) to pin the message.
    async def pin_message(channel_id: str | int, message_id: str | int, reason: str | None = None, ctx: Context = None) -> str: # type: ignore[override] """Pin 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("pin message", message.pin(reason=reason)) return f"Pinned message {message.id} in channel {channel.id}."

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