Gen6

Discord

Interact with Discord

Discord is a communication platform that supports text, voice, and video interactions within servers and communities. Discord bots extend the platform’s capabilities by automating actions, responding to messages, and integrating with external systems.

With a Discord bot, you can:

  • Send messages: Post automated updates or notifications into channels.
  • Read messages: Retrieve recent chat messages for analysis or display.
  • Access server info: Retrieve metadata such as server name, member count, and roles.
  • Access user info: Fetch specific user information by their unique Discord ID.

In Gen6, the Discord integration allows your agents to interact with servers programmatically, automate notifications, and connect workflows with Discord communities.


Setup Instructions

Follow these steps carefully to create a Discord bot, get your IDs, and connect everything properly.

Create a Discord Application and Bot

  1. Go to the Discord Developer Portal.
  2. Click “New Application” → give it a name and click Create.
  3. In the left sidebar, click “Bot”“Add Bot”Yes, do it!
  4. Under TOKEN, click “Reset Token” → copy the Bot Token and store it safely.
    • Example placeholder:
    DISCORD_BOT_TOKEN=your_bot_token_here
  5. Scroll down to Privileged Gateway Intents and enable:
    • Message Content Intent
    • Server Members Intent (if you want user data)
    • Presence Intent (optional but useful for activity info)
  6. Click Save Changes.

Screenshot

Discord screenshot


Invite the Bot to a Discord Server

  1. In the OAuth2 → URL Generator section:
    • Under SCOPES, check:
      • bot
      • applications.commands
    • Under BOT PERMISSIONS, select:
      • Send Messages
      • Read Message History
      • View Channels
      • Manage Messages (optional)
  2. Copy the generated OAuth2 URL and open it in your browser.
  3. Select a server you manage → click Authorize → complete CAPTCHA.
  4. Your bot will now appear in the server’s member list.

Screenshot

Discord screenshot


3️⃣ Get Required IDs

You’ll need several Discord IDs for API access.

Enable Developer Mode (one-time)

  1. Open Discord → click the ⚙️ Settings icon → Advanced.
  2. Turn on Developer Mode.

Now you can right-click items to copy their unique IDs.

Get the Server ID (Guild ID)

  • Right-click your server icon in Discord → Copy Server ID. : DISCORD_SERVER_ID=123456789012345678

Screenshot

Get the Channel ID

  • Right-click the channel nameCopy Channel ID. : DISCORD_CHANNEL_ID=123*********

Screenshot

Get a User ID

  • Right-click the user’s profile picture or nameCopy User ID. : DISCORD_USER_ID=12345********

Tools

discord_send_message

Send a message to a Discord channel

Input

ParameterTypeRequiredDescription
botTokenstringYesThe bot token for authentication
channelIdstringYesThe Discord channel ID to send the message to
contentstringNoThe text content of the message
serverIdstringYesThe Discord server ID (guild ID)

Output

ParameterTypeDescription
messagestringMessage content
dataanyResponse data

Screenshot

discord_get_messages

Retrieve messages from a Discord channel

Input

ParameterTypeRequiredDescription
botTokenstringYesThe bot token for authentication
channelIdstringYesThe Discord channel ID to retrieve messages from
limitnumberNoMaximum number of messages to retrieve (default: 10, max: 100)

Output

ParameterTypeDescription
messagestringMessage content
dataanyResponse data

Screenshot

Discord screenshot

discord_get_server

Retrieve information about a Discord server (guild)

Input

ParameterTypeRequiredDescription
botTokenstringYesThe bot token for authentication
serverIdstringYesThe Discord server ID (guild ID)

Output

ParameterTypeDescription
messagestringMessage content
dataanyResponse data

Screenshot

Discord screenshot

discord_get_user

Retrieve information about a Discord user

Input

ParameterTypeRequiredDescription
botTokenstringYesDiscord bot token for authentication
userIdstringYesThe Discord user ID

Output

ParameterTypeDescription
messagestringMessage content
dataanyResponse data

Screenshot

Discord screenshot

Notes

  • Category: tools
  • Type: discord
Discord