Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/universeclouddev/Universe/llms.txt

Use this file to discover all available pages before exploring further.

The Discord extension connects a JDA-powered bot to your Discord server and registers a set of slash commands for interacting with your Universe cluster. You can view cluster status, list instances and configurations, start and stop instances, and pipe commands to running instance stdin — all from Discord, with optional role-based access control to restrict commands to trusted members.

Features

  • Cluster overview — Active instance count and configuration count at a glance
  • Instance listing — All active instances with state, address, and runtime
  • Configuration listing — All configurations with their properties
  • Instance details — Full detail view for a specific instance by ID
  • Instance lifecycle — Start new instances and stop existing ones
  • Stdin execution — Send a command directly to a running instance’s stdin
  • Role-based access control — Restrict all commands to specific Discord role IDs

Setup

1

Create a Discord Bot

  1. Go to the Discord Developer Portal
  2. Create a new application and navigate to Bot → Add Bot
  3. Copy the bot token — you will need it for the config file
  4. Navigate to OAuth2 → URL Generator and select these scopes and permissions:
    • Scopes: bot, applications.commands
    • Bot Permissions: Send Messages, Embed Links, Use Application Commands, Read Message History
  5. Use the generated URL to invite the bot to your server
2

Configure the Extension

Create ./extensions/discord/config.json with your bot token and server ID:
{
  "token": "YOUR_BOT_TOKEN_HERE",
  "guildId": "123456789012345678",
  "statusChannelId": "",
  "logChannelId": "",
  "embedColor": 5814783,
  "allowedRoleIds": ["123456789012345678"],
  "intents": ["MESSAGE_CONTENT", "GUILD_MESSAGES", "GUILD_MEMBERS"]
}
3

Place the Extension JAR

Copy extension-discord.jar into ./extensions/. The extension is loaded automatically on next startup.
4

Restart Universe

Start or restart Universe. The bot will authenticate with Discord, register slash commands for your guild, and log a success message to the console.

Configuration Reference

FieldTypeRequiredDescription
tokenstringYesDiscord bot token from the Developer Portal
guildIdstringNoYour Discord server (guild) ID. Used to scope slash command registration to a single server for instant availability
statusChannelIdstringNoChannel ID to post status update messages
logChannelIdstringNoChannel ID to mirror Universe console log output
embedColorintegerNoEmbed accent colour as a decimal integer. Default: 5814783 (a blue-purple)
allowedRoleIdsarrayNoList of Discord role IDs whose members can use bot commands. Empty array means all users can use commands
intentsarrayNoGateway intents to enable. The defaults (MESSAGE_CONTENT, GUILD_MESSAGES, GUILD_MEMBERS) are required for the bot to function correctly

Available Commands

CommandArgumentsDescription
/statusShow cluster overview: active instance count and configuration count
/instancesList all active instances with state, address, and runtime type
/configurationsList all configurations
/instanceidGet detailed information for a specific instance by its ID
/startconfigurationRequest a new instance to be started from the named configuration
/stopidRequest an instance to be stopped by ID
/executeid, commandSend a command string to a running instance’s stdin

Role-Based Access Control

Set allowedRoleIds in the config to restrict command access to specific Discord roles. Only users who have at least one of the listed roles can invoke bot commands. Users without a matching role receive an ephemeral error message. Finding a role ID:
  1. Open Discord Settings → Advanced and enable Developer Mode
  2. Right-click any role in your server’s role list → Copy Role ID
  3. Paste the ID as a string in the allowedRoleIds array
{
  "allowedRoleIds": [
    "111222333444555666",
    "999888777666555444"
  ]
}
If allowedRoleIds is an empty array ([]), all users can use commands — suitable for private servers but not recommended for servers with untrusted members.
The Discord extension is implemented with JDA 6.4.1 and Cloud JDA6 for slash command handling. All JDA and Cloud dependencies are relocated to gg.scala.universe.libs.* inside the extension JAR to prevent classpath conflicts with other extensions.

Build docs developers (and LLMs) love