Medusa/Dashboard

Dashboard

The pages on Medusa's web dashboard, running more than one bot, and how the dashboard starts.

The dashboard is where you set Medusa up and run it day to day. It runs inside Medusa on the dashboard port, 3000 by default, so there is nothing extra to host. Sign in with Discord. Staff see only the pages their rank allows.

Pages

PageWhat it is for
OverviewBot status, version, loaded modules, server stats and the live console.
BotConnection, presence, profile and additional bots.
EmbedsBuild an embed or Components V2 message and send it to a channel.
ModulesTurn modules on or off and see what each one adds.
ConfigsEvery module's settings, with channel, role, emoji and color pickers.
CommandsRename commands, turn them off, or add a text prefix or mention trigger.
LangEdit any message or embed, in any of the 16 languages.
LoggingPick a channel for each module's log events.
LogsThe live console, filterable by level. Keys and secrets are hidden.
AuditWho changed what on the dashboard, and when.
PermissionsRanks, their roles and users, and what they unlock.
PostPost module panels into a channel.
LeaderboardEvery module's leaderboards in one place.
SettingsLicense, credentials, language, updates, appearance, branding and server URLs.

Modules add their own pages too, such as Moderation Cases, Tickets and Music Player. Each appears only while its module is on.

Overview

Signing In

The sign-in redirect for your Discord app is your dashboard address followed by /api/auth/callback/discord. Add it under OAuth2 > Redirects in the Discord Developer Portal.

OAuth2 redirect

On a domain, set the Dashboard URL under Settings > Server URLs to the same address. The dashboard URL, the address in your browser and the redirect must all match, or sign-in fails with Invalid origin.

The license owner always has full access. Everyone else needs a rank on the Permissions page.

Multiple Bots

Medusa can run more than one Discord bot at once. The bot from setup is the primary bot. It runs Core and every module you have not given to another bot. For example, one bot could run Tickets and another Games.

To add a bot, open the Bot page, click Switch Bots, then Add Bot:

  1. Token: paste the bot token. Medusa checks the token, the privileged intents and that the bot is on your license.
  2. Personality: set the username, status and activity, and upload an avatar or banner (PNG, JPG, GIF or WEBP, up to 10 MB), or leave them as they are.
  3. Modules: pick the modules this bot runs. A module belongs to one bot at a time.
  4. Setup: Medusa connects, syncs commands and uploads emojis, then gives you an invite link.

Once you have more than one bot, a bot picker appears in the sidebar. Configs, Lang, Logging and Commands then show only the modules the selected bot runs. Remove bot disconnects a bot and moves its modules back to the primary bot.

Discord only sends button and menu clicks to the bot that posted the message. After moving a module to another bot, post its panels again from the Post page.

Each bot is its own Discord application, so each has its own slash commands, its own limit of 5 user and 5 message context menus, and its own copy of Medusa's emojis.

Branding

Settings > Branding sets the dashboard name, accent color and icon. The icon is your custom icon URL when Custom icon is on, otherwise your primary server's icon.

Emoji colour sets the color of Medusa's built-in emojis: Purple, Blue, Green, Red, Pink or Orange. Changing it deletes the bot's application emojis and uploads the new set. New messages use the new color straight away. Post panels again from the Post page to update older ones.

How It Starts

Medusa starts its API, then the dashboard, then loads modules and connects to Discord. The first time, and whenever files under src/dashboard/ change, it installs the dashboard's packages and builds it. Adding or removing modules never rebuilds the dashboard, because module pages are compiled when first opened.

If a port is already taken, Medusa names the process using it and stops:

DASHBOARD STARTUP ERROR

Issue       Port 3000 is already in use
Cause       Another process is listening on port 3000: node index.js (pid 43845)
Fix         Stop that process or change SERVER.DASHBOARD.PORT in config.json