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. Specifically, the 'Delete' operation under the 'Message' resource allows users to delete a message from a specified channel by providing the channel ID and message ID. This is useful for automating message management, such as removing outdated or inappropriate messages in Discord channels.

Use Case Examples

  1. Automatically delete a specific message in a Discord channel after a certain event.
  2. Clean up messages in a channel by deleting them programmatically based on workflow conditions.

Properties

Name Meaning
Channel ID The ID of the Discord channel where the message to be deleted is located.
Message ID The ID of the message to be deleted in the specified channel.
Additional Fields Optional additional parameters that can be provided for the operation, such as embed JSON, TTS flag, reason for action, and other Discord-specific message or channel settings.

Output

JSON

  • success - Indicates if the message deletion was successful.
  • messageId - The ID of the deleted message.

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 that the Message ID exists in the specified channel; attempting to delete a non-existent message will cause an error.
  • The bot token used must have appropriate permissions to delete messages in the target channel; lack of permissions will result in operation failure.

Links

  • Discord.js Message.delete() - Official documentation for deleting messages using the Discord.js library, which this node uses internally.

Discussion