Discord
How to find pinned Discord messages
Use the channel pins endpoint when a bot or script needs pinned-message data. Open the Pins panel in Discord when a teammate needs to review and jump to pinned messages interactively.
Documentation reviewed · 2 methods with sources
Ways to do it
API
Get Channel Pins
Retrieve pinned-message objects for one channel. If has_more is true, pass the last returned pinned_at timestamp as before.
Read source: Discord Message resource: Get Channel Pins- Requirements
- A bot token with VIEW_CHANNEL and READ_MESSAGE_HISTORY on the channel, plus the channel ID. Message text can require the MESSAGE_CONTENT privileged intent.
- Limitations
- The endpoint returns up to 50 pins per request. It returns no pins without READ_MESSAGE_HISTORY.
Example shell
curl -H "Authorization: Bot $DISCORD_BOT_TOKEN" \
"https://discord.com/api/v10/channels/$CHANNEL_ID/messages/pins?limit=50"Interface
Discord Pins panel
Select the pin icon in a channel to view its pinned messages and jump to a pinned message's original location.
Read source: Discord Pin Messages FAQ- Requirements
- Access to the channel. Members who can access the channel can view its pinned messages.
- Limitations
- The panel shows one channel’s pins at a time. A channel or DM can hold up to 250 pins.
Example text
Discord desktop or web: open the channel, select the pin icon, and choose a pinned message to jump to it.