Discord Trigger icon

Discord Trigger

Trigger based on Discord events

Overview

This node triggers workflows based on various Discord events such as messages, threads, commands, interactions, user joins/leaves, presence updates, nickname changes, and role changes. It is useful for automating responses or actions in Discord servers when specific events occur. For example, it can trigger a workflow when a message containing a certain pattern is sent, when a user joins a server, or when a user interacts with a button.

Use Case Examples

  1. Trigger a workflow when a message starts with a specific keyword in selected channels.
  2. Trigger a workflow when a user joins a Discord server to send a welcome message.
  3. Trigger a workflow when a user role is added or removed to update permissions.

Properties

Name Meaning
Choose servers Select a list of servers for this trigger.
Listen to Select the text channels to listen to for triggering the workflow. If none selected, all channels are listened to.
From roles Select roles to listen to for events. If none selected, listens to @everyone.
Trigger type Type of Discord event to listen to, such as message, thread, command, interaction, user joins, user leaves, presence update, nick update, role added, or role removed.
Which roles Select roles to listen to for role added or removed events. If none selected, listens to @everyone.
Presence Type of presence change to listen to for presence update events.
Pattern How to match the message or thread content (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 to listen to.
Input field type Type of input field for the command (none, text, number, integer, boolean).
Input field description Description of the command input field.
Input field required Whether the command input field is required.
Case Sensitive Whether message matching is case sensitive.
Bot Mention Whether the message must mention the bot to trigger.
Message ID Message ID of the button/select to listen to for interaction events.
Placeholder Placeholder message shown in the channel when the workflow is running.

Output

JSON

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

Dependencies

  • Discord API
  • Bot credentials with API key and base URL

Troubleshooting

  • Ensure the bot is running and has the necessary permissions in the selected servers and channels.
  • If channels or roles do not load, check credentials and bot connection, then reopen the modal to refresh options.
  • For command triggers, ensure the command name is alphanumeric and the trigger is active; restart Discord client if commands do not appear.
  • Common error messages relate to invalid credentials or connection issues; verify API key and base URL are correct.

Links

Discussion