Overview
This node enables sending various types of interactions to Discord channels via a bot. It supports sending plain messages, rich embedded messages, interactive prompts with buttons or select dropdowns, performing actions like managing roles or removing messages, and voice channel operations such as joining, leaving, playing, or stopping audio.
Common scenarios include:
- Sending notifications or alerts to specific Discord text channels.
- Creating interactive workflows where users respond by clicking buttons or selecting options.
- Moderation tasks like bulk deleting messages or managing user roles.
- Controlling bot presence and activity status.
- Managing voice channel participation and audio playback.
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, replaces a previously set placeholder message (from a trigger or another send node) with the current message. |
| Send to the trigger channel | Sends the message to the same channel where the workflow was triggered, without replacing any placeholder. |
| Send to | Selects the target text channel to send the message to. Requires valid credentials and bot permissions. |
| Type | The type of interaction to perform: message, button prompt, select prompt, action, voice, or none. |
| Action | When Type is action, choose the action: remove messages, add role to user, or remove role from user. |
| User ID | The Discord user ID to add or remove roles from (required for role management actions). |
| Which roles | Roles to add or remove from the specified user (for role management actions). |
| How many? | Number of recent messages to remove (max 150, only messages less than 4 weeks old) when removing messages. |
| Content | Text content of the message or prompt. Required for button/select prompts. |
| Embed | Enables sending a rich embed message with additional formatting and media. |
| Color | Color of the embed sidebar. |
| Title | Title of the embed. |
| URL | URL linked from the embed title. |
| Author name | Name shown 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. |
| Description | Main description text of the embed. |
| Thumbnail URL or base64 | URL or base64 image shown as the embed thumbnail. |
| Fields | Custom fields in the embed, each with a title, value, and optional inline display. |
| Image URL or base64 | Large image displayed in the embed. |
| Buttons | Up to 5 buttons for interactive prompts, each with label, value returned on click, and style (primary, secondary, success, danger). |
| Select | Options for a dropdown select prompt, each with label, optional description, and return value. |
| Persistent | Keeps buttons or selects visible after workflow completion if enabled. |
| Min select | Minimum number of options that must be selected in a persistent select prompt. |
| Max select | Maximum number of options selectable in a persistent select prompt. |
| Message ID | ID of a message to update instead of sending a new one (used with persistent prompts). |
| Footer text | Footer text in the embed. |
| Footer icon URL or base64 | Icon image for the embed footer. |
| Displayed date | Timestamp shown in the embed. |
| Timeout | Time in seconds to wait for user interaction before continuing or stopping execution. Zero means indefinite wait. |
| Restrict to triggering user | Only allow the user who triggered the workflow to interact with buttons or selects. |
| Restrict to mentioned roles | Only allow users with specified roles to interact with buttons or selects. |
| Files | Attach up to 5 images (PNG, JPG) to the message by URL or base64. |
| Mention roles | Roles to mention in the message. |
| Placeholder | Placeholder text shown while waiting for user interaction, 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 activity displayed: Playing, Streaming, Listening, Watching. |
| Bot status | Bot's online status: Online, Idle, Do not disturb, Invisible. |
| Audit Log Reason | Reason logged in Discord audit logs for performed actions. |
| Voice Action | Voice-related action to perform: join channel, leave channel, play audio, stop audio. |
| Voice Channel | Target voice channel for join or play actions. |
| Audio URL | URL of audio to play in voice channel (supports YouTube URLs). |
Output
The node outputs JSON objects representing the result of the sent message or action. Each output item includes:
value: The main response or result value from Discord.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 Discord tag.messageId: The ID of the message sent or updated.action: The type of action performed (e.g., role added, messages removed).
If the node sends interactive prompts (buttons or selects), it waits for user responses and outputs the selected values accordingly.
Binary data output is not explicitly handled by this node; attachments are sent as URLs or base64 strings but not output as binary data.
Dependencies
- Requires a valid Discord bot API key credential with appropriate permissions.
- The bot must be running and connected to the Discord server.
- Permissions needed depend on actions: sending messages, managing roles, deleting messages, joining voice channels, etc.
- The node uses internal helper functions to fetch available channels, roles, and voice channels dynamically.
- For voice actions, it relies on a voice manager module to handle joining/leaving channels and playing/stopping audio.
Troubleshooting
- Invalid Credentials: If the API key or bot token is invalid, the node will throw an authentication error. Verify the bot token and ensure it has required permissions.
- Missing Permissions: Actions like deleting messages or managing roles require the bot to have those permissions in the Discord server. Lack of permissions will cause errors.
- Channel or Role Not Found: Selecting a channel or role that the bot cannot access or does not exist will cause failures. Refresh the options list or verify bot access.
- Message Too Old to Delete: Discord API restricts bulk deletion to messages younger than 2 weeks. Attempting to delete older messages will fail.
- Timeouts on Prompts: If a prompt times out, the workflow may continue or stop depending on configuration. Ensure timeout settings match expected user response times.
- Voice Actions Fail: Joining or playing audio in voice channels requires the bot to have voice permissions and the channel to exist. Check voice channel IDs and bot permissions.
- Placeholder Replacement Issues: Using the placeholder replacement option requires a prior placeholder message set by a trigger or another send node. Otherwise, no replacement occurs.