Discord icon

Discord

Interact with Discord API - Full Bot Features

Overview

This node interacts with the Discord API to perform various operations related to Discord messages, channels, guilds, members, roles, threads, reactions, voice channels, DMs, webhooks, and invites. Specifically, for the Message resource with the Pin operation, it pins a specified message in a given channel. This is useful for highlighting important messages in a Discord channel so that they remain easily accessible to all members. For example, a user can pin announcements or key information messages in a community channel.

Use Case Examples

  1. Pinning a message in a Discord channel to keep it visible to all members.
  2. Managing messages by sending, editing, deleting, reacting, pinning, or unpinning them.

Properties

Name Meaning
Channel ID The ID of the Discord channel where the message is located.
Message ID The ID of the message to be pinned.
Additional Fields Optional additional parameters such as embed JSON, text-to-speech flag, reason for audit logs, and other message or channel related settings.

Output

JSON

  • success - Indicates if the pin operation was successful.
  • messageId - The ID of the pinned message.
  • pinned - Boolean indicating the message is pinned (true).

Dependencies

  • Discord API
  • An API key credential for Discord bot authentication

Troubleshooting

  • Ensure the provided Channel ID corresponds to a valid text-based channel in the Discord server; otherwise, the node will throw a 'Channel not found or not text-based' error.
  • Verify the Message ID is correct and the message exists in the specified channel to avoid fetch errors.
  • Check that the bot token credential is valid and has the necessary permissions to pin messages in the channel.
  • Invalid JSON in embed fields will cause errors; ensure JSON is properly formatted.

Links

Discussion