Skip to main content

Discord Bot

The Discord Bot package enables you to build powerful automation workflows and interactive bots for Discord. Use this package to automate channel operations, send and receive messages, create slash commands, handle interactions, manage roles, and build comprehensive Discord bot applications.

Key Features

  • Connection Management - Connect to Discord using bot tokens with persistent sessions
  • Messaging - Send, receive, edit, and delete messages in channels and direct messages
  • Channel Operations - Create, delete, and manage text and voice channels
  • Slash Commands - Create, list, and delete Discord application commands
  • Interactions - Handle command interactions, button clicks, modal submissions, and autocomplete
  • Role Management - Add and remove roles from server members
  • Forum Channels - Create posts in Discord forum channels
  • User Information - Retrieve user and channel details
  • Invite Links - Generate channel invitation links
  • Rich Content - Support for embeds, buttons, files, and message components

Common Use Cases

  • Customer Support Bots - Automate responses and ticket management
  • Notification Systems - Send automated alerts and updates to Discord channels
  • Community Moderation - Manage roles, channels, and user interactions
  • Interactive Applications - Build bots with slash commands and button interactions
  • Data Integration - Connect Discord with other services and databases
  • Event Management - Automate event announcements and RSVP tracking
  • Gaming Bots - Create game-related features and integrations

Getting Started

Prerequisites

  1. Discord Application - Create a Discord application at Discord Developer Portal
  2. Bot Token - Generate a bot token from your application settings
  3. Bot Permissions - Configure appropriate permissions (Send Messages, Manage Channels, etc.)
  4. Server Invitation - Invite your bot to a Discord server with necessary permissions

Basic Bot Flow

A typical Discord bot workflow consists of:

  1. Connect - Establish connection using your bot token
  2. Operations - Perform actions (send messages, create channels, etc.)
  3. Disconnect - Close the connection when done

Alternative Authentication

Many nodes support two authentication methods:

  • Client ID Method - Use Connect node first, then pass the Client ID to other nodes
  • Direct Token Method - Provide bot token directly in each node's credentials

Bot Setup Guide

Step 1: Create Discord Application

  1. Visit Discord Developer Portal
  2. Click "New Application" and give it a name
  3. Navigate to the "Bot" section in the left sidebar
  4. Click "Add Bot" to create a bot user
  5. Copy the bot token (you'll need this for Robomotion)

Step 2: Configure Bot Permissions

In the "Bot" section, enable the following Privileged Gateway Intents if needed:

  • Presence Intent - For user status tracking
  • Server Members Intent - For member list and updates
  • Message Content Intent - For reading message content

Step 3: Invite Bot to Server

  1. Go to "OAuth2" > "URL Generator"
  2. Select "bot" and "applications.commands" scopes
  3. Select required permissions (e.g., Send Messages, Manage Channels)
  4. Copy the generated URL and open it in a browser
  5. Select your server and authorize the bot

Step 4: Store Credentials in Robomotion

  1. In Robomotion, go to Vault
  2. Create a new credential
  3. Paste your Discord bot token
  4. Use this credential in Connect or other Discord nodes

Finding Discord IDs

Discord IDs are required for many operations. Enable Developer Mode to copy IDs:

  1. In Discord, go to User Settings > Advanced
  2. Enable "Developer Mode"
  3. Right-click on servers, channels, users, or messages
  4. Select "Copy ID" to get the ID

Package Nodes