discord_pin_message
Pin or unpin messages in Discord channels to highlight important information or organize content.
Instructions
Pin or unpin a message in a channel.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| channel_id | Yes | ||
| message_id | Yes | ||
| pin | Yes | true to pin, false to unpin. |
Implementation Reference
- src/tools/messages.ts:400-405 (handler)Handler logic for discord_pin_message tool, fetching the channel and message, then pinning or unpinning based on input.
case "discord_pin_message": { const channel = await getTextChannel(args.channel_id as string); const msg = await channel.messages.fetch(args.message_id as string); if (args.pin) { await msg.pin(); } else { await msg.unpin(); } return { content: [{ type: "text", text: `✅ Message ${args.pin ? "pinned" : "unpinned"}.` }] }; } - src/tools/messages.ts:241-252 (schema)Schema definition for discord_pin_message tool.
{ name: "discord_pin_message", description: "Pin or unpin a message in a channel.", inputSchema: { type: "object", properties: { channel_id: { type: "string" }, message_id: { type: "string" }, pin: { type: "boolean", description: "true to pin, false to unpin." }, }, required: ["channel_id", "message_id", "pin"], },