Discord Send icon

Discord Send

Sends messages, embeds and prompts to Discord

Overview

This node allows sending various types of messages and performing actions on Discord channels through a bot. It supports sending plain text messages, rich embedded messages, interactive prompts with buttons or select dropdowns, and executing administrative actions like removing messages or managing user roles.

Common scenarios include:

  • Sending notifications or alerts to specific Discord channels.
  • Creating interactive workflows where users respond via buttons or dropdowns.
  • Moderation tasks such as bulk deleting messages or assigning/removing roles from users.
  • Updating bot presence and status dynamically.

For example, you could use this node to send a welcome message with buttons for new users to select their interests, or automatically remove the last 100 messages in a channel after an event.

Properties

Name Meaning
Replace the Trigger Placeholder If enabled, the message sent by this node replaces a placeholder message set previously (e.g., by a Discord Trigger node or another Discord Send node).
Send to the Trigger Channel If enabled, sends the message to the same channel where the workflow was triggered without replacing any placeholder.
Send To Name or ID Select or specify the target text channel by name or ID where the message will be sent. Requires valid credentials and bot permissions.
Type The type of interaction to perform:
• Action (perform an action like removing messages or role management)
• Button Prompt (send interactive buttons and wait for response)
• Message (send a simple message)
• None (clear placeholders or update bot status)
• Select Prompt (interactive dropdown list)
Action When Type is "Action", choose the specific action:
• Remove Messages
• Add Role to User
• Remove Role From User
User ID For role management actions, the ID of the user to add or remove roles from.
Which Role Names or IDs Roles to add or remove from the specified user. Can be selected from available roles or specified by ID.
How Many? Number of recent messages to remove when using the Remove Messages action (max 150, only messages less than 4 weeks old).
Content Text content of the message or prompt. Cannot be empty for button or select prompts.
Embed Enable creation of rich embedded messages with additional formatting and media.
Color Color of the embed sidebar (when Embed is enabled).
Title Title text of the embed.
URL URL linked from the embed title.
Author Name Name displayed as the author of the embed.
Author Icon URL or Base64 Image URL or base64 string for the author's icon in the embed.
Author URL URL linked from the author name in the embed.
Description Main description text of the embed.
Thumbnail URL or Base64 URL or base64 image shown as thumbnail in the embed.
Fields Custom fields inside the embed, each with a title, value, and inline display option.
Image URL or Base64 Large image displayed in the embed.
Buttons For Button Prompt type: up to 5 buttons with label, return value, and style (Primary, Secondary, Success, Danger).
Select For Select Prompt type: options for dropdown with label, optional description, and return value.
Persistent For button/select prompts: whether the prompt stays visible after workflow completion.
Min Select Minimum number of options that must be selected in a persistent select prompt.
Max Select Maximum number of options that can be selected in a persistent select prompt.
Message ID For persistent prompts: ID of the message to update instead of sending a new one.
Footer Text Footer text in the embed.
Footer Icon URL or Base64 Image URL or base64 for the footer icon in the embed.
Displayed Date Timestamp to show in the embed.
Timeout Time in seconds to wait for user interaction on button/select prompts before continuing or stopping execution. 0 means wait indefinitely.
Restrict to Triggering User Only allow the user who triggered the workflow to interact with the prompt.
Restrict to Mentioned Roles Only allow users with specified roles to interact with the prompt.
Files Attach up to 5 images (png, jpg) to the message by URL or base64.
Mention Role Names or IDs Roles to mention in the message.
Placeholder Placeholder text shown while waiting for user interaction on button/select prompts, with animated dots indicating workflow running.
Bot Customization Enable customizing the bot's activity and status.
Bot Activity Text describing the bot's current activity (e.g., "Playing X").
Bot Activity Type Type of bot activity: Playing, Streaming, Listening, Watching.
Bot Status Bot's online status: Online, Idle, Do Not Disturb, Invisible.
Audit Log Reason Reason for the action to be logged in Discord's audit log.

Output

The node outputs JSON objects containing information about the result of the operation or interaction:

  • value: The returned value from the interaction (e.g., button clicked or select option chosen).
  • channelId: The ID of the channel where the message or action occurred.
  • userId: The ID of the user interacting or affected.
  • userName: The username of the user.
  • userTag: The user's tag (username#discriminator).
  • messageId: The ID of the message sent or updated.
  • action: The action performed (e.g., role added/removed, messages removed).

If the node sends binary data (such as attached images), it is handled internally but not explicitly detailed in the output JSON.

Dependencies

  • Requires a valid API key credential for Discord with appropriate permissions for sending messages, managing roles, and deleting messages.
  • The bot must be running and connected to the Discord server.
  • The node loads available channels and roles dynamically from Discord via helper methods.
  • Proper permissions are required for the bot to perform actions like role management and message deletion.
  • No external services beyond Discord API are needed.

Troubleshooting

  • Common issues:

    • Invalid or missing API credentials will cause connection errors.
    • Insufficient bot permissions may lead to failures in sending messages, deleting messages, or managing roles.
    • Trying to delete messages older than 4 weeks will fail due to Discord API limitations.
    • Specifying invalid channel, user, or role IDs will cause errors.
    • Using button/select prompts without content will cause validation errors.
  • Error messages:

    • Connection errors indicate invalid credentials or network issues; verify API key and connectivity.
    • Permission errors suggest the bot lacks required Discord permissions; adjust bot roles accordingly.
    • Validation errors occur if required parameters are missing or invalid; ensure all mandatory fields are filled.
    • Timeout errors happen if no user interaction occurs within the specified timeout period; increase timeout or handle no-response cases.
  • Resolutions:

    • Double-check and refresh API credentials.
    • Ensure the bot has the necessary permissions in the Discord server.
    • Use expressions carefully to provide valid IDs.
    • Test with simple messages before adding complex embeds or prompts.

Links and References

Discussion