Nodes2Cloud
Nodes2CloudDocs
Integrations

Discord

Automate Discord messages, channels, and member management

Discord Integration

The Discord integration allows you to build bots that send messages, manage server channels, and administer members within your Discord servers (Guilds).

How to get credentials

Discord requires a Bot Token.

  1. Go to the Discord Developer Portal.
  2. Click New Application and give it a name.
  3. Navigate to the Bot tab on the left.
  4. Click Add Bot and confirm.
  5. Click Reset Token and copy the generated Bot Token.
  6. Important: To allow your bot into your server, go to the OAuth2 -> URL Generator tab. Select the bot scope, choose the necessary permissions (e.g., Send Messages, Manage Channels), and open the generated URL to invite the bot to your server.
  7. In Nodes2Cloud, create a new Discord credential and paste the Bot Token.

1. Message Operations

Available Actions

  • Send Message: Posts a message to a specific channel.
  • Get a message: Retrieves a specific message by its ID.
  • Delete a message: Deletes a specific message.
  • React with an emoji to a message: Adds a reaction to a message.

Common Fields

  • Channel ID: The unique ID of the channel. (Enable Developer Mode in Discord settings, then right-click a channel and select "Copy ID").
  • Content: The text of the message. You can use standard Discord markdown.

2. Channel Operations

Available Actions

  • List channels: Retrieves all channels in a server (Guild).
  • Get a channel: Retrieves metadata for a specific channel.
  • Create a channel: Creates a new text or voice channel.
  • Update a channel: Modifies channel settings (e.g., name or topic).
  • Delete a channel: Deletes a channel.

Common Fields

  • Guild ID: The unique ID of the server. (Right-click the server icon and select "Copy ID").

3. Member Operations

Available Actions

  • List members: Lists users in the server.
  • Kick a member: Removes a user from the server.
  • Ban / Unban a member: Manages server bans.
  • Timeout a member: Temporarily restricts a user from interacting.
  • Add / Remove a role to a member: Manages user roles.

Common Fields

  • User ID: The unique ID of the Discord user.
  • Role ID: The unique ID of the role.

Common Troubleshooting

  • 403 Forbidden: Ensure your bot actually has the necessary permissions granted within the Discord server (e.g., "Manage Roles" to add roles, or "Send Messages" to post). Also, ensure the bot's role is placed higher in the server's role hierarchy than the role or user it is trying to manage.
  • Intents: If you are trying to use List members, ensure you have enabled the "Server Members Intent" toggle in the Bot tab of the Discord Developer Portal.

On this page