Discord Action DND icon

Discord Action DND

Perform Discord bot actions

Discord Action DND

AI-generated

Summary

Execute various Discord bot actions such as sending messages, managing scheduled events, and manipulating channels based on the specified action type and action. Sending messages now requires that at least one of message content, embeds, or files is provided; otherwise an error is thrown. Sending messages will also catch and rethrow errors with a detailed message.

Inputs

  • actionType (required) — Select the type of Discord event to action on: Message, Scheduled Event, or Channel.
  • action (required) — Select the specific Discord action to perform, dependent on the chosen actionType.
  • sendTo (required) — Specify whether to send a message to a channel or user (required when action is 'sendMessage').
  • serverId — ID of the Discord server (guild), used when sending messages to a channel.
  • channelId — ID of the channel for sending messages or performing channel-specific actions.
  • userId — ID of the user for sending direct messages or reaction/removal actions.
  • messageContent — Content text of the message to send (used with sendMessage action).
  • options — Additional optional message settings such as flags (e.g., suppress embeds, suppress notifications) or reply message ID.
  • embeds — List of message embeds, which can be input as structured fields or raw JSON (only applicable when sending messages).
  • files — List of files to attach to the message from binary data in input.
  • messageId (required) — ID of the message to act upon for actions like delete, edit, react, remove reaction, pin, or unpin.
  • newContent (required) — New content to replace the existing message content (required for editMessage action).
  • emoji — Emoji character or custom emoji ID to react with or remove reaction by.
  • all — Boolean indicating whether to remove all reactions from the message (applies only to removeReaction action).
  • guildId (required) — ID of the guild (server) for scheduled event and channel actions that require it.
  • guildScheduledEventId (required) — ID of the scheduled event to get, update, or delete.
  • eventName (required) — Name of the scheduled event to create.
  • eventStartTime (required) — Start time of the scheduled event to create.
  • eventEntityType (required) — Entity type of the scheduled event (Stage Instance, Voice, External).
  • eventPrivacyLevel (required) — Privacy level of the scheduled event.
  • eventChannelId — Channel ID associated with the scheduled event when required (Stage Instance or Voice).
  • eventOptions — Optional fields for the scheduled event such as description, end time, location, and image URL.
  • eventUpdateFields — Fields to update for a scheduled event including name, description, start/end time, channel ID, entity type, status, location, and image URL.
  • channelGuildId (required) — Guild ID where the channel is or will be created or listed.
  • targetChannelId (required) — ID of the channel to get, update, or delete.
  • channelName (required) — Name of the channel to create.
  • channelType (required) — Type of channel to create: Text, Voice, Category, Announcement, Stage, or Forum.
  • channelOptions — Optional channel fields like topic, position, NSFW status, bitrate, user limit, slowmode, parent category, and inheritance of parent permissions.
  • permissionOverwrites — Explicit permission overwrites for roles or members on channel creation or update (replaces existing).
  • permissionAdd — Permissions to add to existing channel permissions for roles or members (merges with existing).
  • permissionRemove — Permissions to remove from channel permission overwrites for specific roles or members.
  • limit — Limit on the number of channels to retrieve when listing channels (0 to retrieve all).
  • channelFilter — Filter criteria for listing channels by type and name substring.

Output shape

A single JSON object containing the result of the specified Discord action.

The output data includes success status and additional action-dependent data such as message IDs, event details, channel info, or error messages if the action failed. The node performs the requested action and closes the Discord client connection before returning.

Links

Discussion