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
- Discord Application - Create a Discord application at Discord Developer Portal
- Bot Token - Generate a bot token from your application settings
- Bot Permissions - Configure appropriate permissions (Send Messages, Manage Channels, etc.)
- Server Invitation - Invite your bot to a Discord server with necessary permissions
Basic Bot Flow
A typical Discord bot workflow consists of:
- Connect - Establish connection using your bot token
- Operations - Perform actions (send messages, create channels, etc.)
- 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
- Visit Discord Developer Portal
- Click "New Application" and give it a name
- Navigate to the "Bot" section in the left sidebar
- Click "Add Bot" to create a bot user
- 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
- Go to "OAuth2" > "URL Generator"
- Select "bot" and "applications.commands" scopes
- Select required permissions (e.g., Send Messages, Manage Channels)
- Copy the generated URL and open it in a browser
- Select your server and authorize the bot
Step 4: Store Credentials in Robomotion
- In Robomotion, go to Vault
- Create a new credential
- Paste your Discord bot token
- 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:
- In Discord, go to User Settings > Advanced
- Enable "Developer Mode"
- Right-click on servers, channels, users, or messages
- Select "Copy ID" to get the ID
Package Nodes
📄️ Add Role Member
Robomotion.DiscordBot.AddRoleMember
📄️ Connect
Robomotion.DiscordBot.Connect
📄️ Create Channel
Robomotion.DiscordBot.CreateChannel
📄️ Create Command
Robomotion.DiscordBot.CreateCommand
📄️ Create Forum Post
Robomotion.DiscordBot.CreateForumPost
📄️ Create Invite Link
Robomotion.DiscordBot.CreateInviteLink
📄️ Delete Channel
Robomotion.DiscordBot.DeleteChannel
📄️ Delete Channel Message
Robomotion.DiscordBot.DeleteChannelMessage
📄️ Delete Command
Robomotion.DiscordBot.DeleteCommand
📄️ Disconnect
Robomotion.DiscordBot.Disconnect
📄️ Edit Channel Message
Robomotion.DiscordBot.EditMessage
📄️ Get Channel Info
Robomotion.DiscordBot.GetChannelInfo
📄️ Get Channel Messages
Robomotion.DiscordBot.GetChannelMessages
📄️ Get User Info
Robomotion.DiscordBot.GetUserInfo
📄️ Interaction In
Robomotion.DiscordBot.InteractionIn
📄️ Interaction Out
Robomotion.DiscordBot.InteractionOut
📄️ List Commands
Robomotion.DiscordBot.ListCommands
📄️ Receive Message
Robomotion.DiscordBot.ReceiveMessage
📄️ Remove Role Member
Robomotion.DiscordBot.RemoveRoleMember
📄️ Send Direct Message
Robomotion.DiscordBot.SendDirectMessage
📄️ Send Channel Message
Robomotion.DiscordBot.SendMessage
📄️ Update Interaction Respond
Robomotion.DiscordBot.UpdateInteractionRespond