Discord Trigger icon

Discord Trigger

Trigger based on Discord events

Overview

This node triggers workflows based on various Discord events such as new messages, message updates, thread creation, user joins/leaves, role changes, and interactions with buttons or selects. It listens to specified text channels and roles, filtering events accordingly. The node is useful for automating responses or actions in Discord servers when specific events occur, such as reacting to commands, monitoring user presence, or tracking role changes.

Use Case Examples

  1. Trigger a workflow when a new message is posted in selected channels.
  2. Start a workflow when a user joins or leaves the server.
  3. React to a specific command sent in Discord with custom input fields.
  4. Listen for user presence updates and trigger actions based on online/offline status.

Properties

Name Meaning
Listen to Select the text channels to listen to for triggering the workflow. If none are selected, all channels are listened to.
From roles Filter events to only those from specified roles. If none selected, listens to @everyone.
Trigger type Type of Discord event to listen to, such as new message, message update, thread creation, command, interaction, user joins/leaves, presence updates, nick updates, and role changes.
Which roles Filter role update events to specified roles. If none selected, listens to @everyone.
Presence Type of presence change to listen to for presence update events.
Pattern How to match the value in messages or threads (equals, starts with, contains, ends with, regex).
Value The value to test against messages or threads.
Name Name of the command to listen to (alphanumeric only).
Description Description of the command.
Input field type Type of input field for the command.
Input field description Description of the input field.
Input field required Whether the input field is required.
Case Sensitive Whether the value matching is case sensitive.
Bot Mention If true, the message must mention the bot to trigger the workflow.
Message ID The message ID of the button/select to listen to for interaction events.
Placeholder A placeholder message shown in the channel when the workflow triggers.

Output

JSON

  • content - Content of the Discord message.
  • channelId - ID of the channel where the event occurred.
  • userId - ID of the user involved in the event.
  • userName - Username of the user.
  • userTag - User tag (discriminator).
  • messageId - ID of the message.
  • presence - User presence status.
  • nick - User nickname.
  • addedRoles - Roles added to the user.
  • removedRoles - Roles removed from the user.
  • interactionMessageId - ID of the interaction message.
  • interactionValues - Values from the interaction.
  • userRoles - Roles of the user.
  • attachments - Attachments included in the message, if any.

Dependencies

  • Requires a Discord API key credential for authentication.
  • Uses Discord API to fetch channels and roles.
  • Connects to a bot via IPC for event listening.

Troubleshooting

  • Ensure the Discord API credentials are valid; connection test will fail otherwise.
  • If no channels or roles appear in the dropdowns, check that the bot is running and has access to the server.
  • For command triggers, ensure the command name is alphanumeric and the trigger is active; restart Discord client if commands do not appear.
  • Errors during execution may be due to network issues or invalid API keys; check error messages for details.
  • If the workflow does not trigger, verify that the correct event type and filters (channels, roles) are set.

Links

Discussion