SANDBOX — DemoAdmin

Connect Discord

First-boot setup. No Discord login required on this page.

You can open this before OAuth exists

Discord sign-in is for the control UI after the host has HTTPS, a client ID, and a client secret. Until then this page stays public so you can copy the redirect URI and invite the bot.

Mode: Sandbox simulator · Discord sign-in is off (keys not set yet)

Host still needs: DISCORD_TOKEN, DISCORD_CLIENT_ID, DISCORD_CLIENT_SECRET, PUBLIC_URL

Where images live

Bot avatar and event covers go to Discord’s CDN. The bot JSON only stores IDs and those HTTPS URLs. The dashboard favicon is the exception: Discord will not host it, so the bot keeps that one file next to its database.

Order of operations

1

Bring this dashboard up on HTTPS

Open this Connect Discord page on your public https:// origin. You do not sign in with Discord to see it — login is off until keys exist.

2

Create the Discord application

Developer Portal → New Application. Copy the Application ID into the field below to build the invite.

3

Bot token + privileged intents

Bot tab → Reset Token. Turn on Server Members Intent and Message Content Intent.

4

Paste the redirect URI in Discord

OAuth2 → Redirects. Discord rejects http. Copy the callback on this page (it is your origin + /api/discord/callback).

5

Set env on the host, then restart

Put DISCORD_TOKEN, DISCORD_CLIENT_ID, DISCORD_CLIENT_SECRET, PUBLIC_URL, and BOT_CONTROL_SECRET on the machine. Restart web + bot. Sign in with Discord appears after that.

Developer Portal: discord.com/developers/applications

Public HTTPS origin

Discord OAuth requires https:// — http is rejected.

Paste the Application ID to build the bot + slash-command invite.

Environment (host only)

Set these on the machine. They are never stored in this page. Discord login stays off until the process restarts with them.

# Privbot — set these on the host. Never commit this file.
# Discord Developer Portal → Application → Bot / OAuth2

DISCORD_TOKEN=
DISCORD_CLIENT_ID=
DISCORD_CLIENT_SECRET=
# Must be a real https:// origin. Discord OAuth refuses http.
PUBLIC_URL=https://privbot.example.com
# Long random string. WebUI and bot process must share it.
BOT_CONTROL_SECRET=
# Optional: your test guild so slash commands appear instantly
DISCORD_GUILD_ID=
# WebUI → bot. Same machine: http://127.0.0.1:8787
# Docker compose: http://bot:8787
BOT_API_URL=http://127.0.0.1:8787
BOT_PORT=8787
BOT_STATE_PATH=/opt/privbot/data/bot-state.json

Slash commands the bot registers

Same handlers as Slash commands. Replies are ephemeral. /dashboard sends members here.

  • /dashboard

    Open the Privbot control UI

    /dashboard

  • /room

    Control your Join-to-Create room

    /room info · /room name <value> · /room limit <value> · /room bitrate <kbps> · /room visibility <mode> · /room invite <user> · /room kick <user> · /room claim · /room mute <user> · /room mute-all · /room unmute-all · /room text · /room clean <minutes>

  • /preset

    Your Join-to-Create template for this hub

    /preset save · /preset load · /preset auto <enabled>

  • /ban

    Room bans you own

    /ban add <user> <scope> · /ban lift <user> · /ban list

  • /rank

    Show XP rank

    /rank [user]

  • /leaderboard

    This month’s XP board

    /leaderboard [period]

  • /colour

    Set a personal name colour

    /colour <hex>

  • /poll

    Create a poll (control UI can do more)

    /poll <question> <options> [hours]

  • /event

    Schedule a server event

    /event <name> <when> [duration-hours]

  • /privbotstaff

    Staff controls

    /privbot maintenance <mode> · /privbot reboot <target> · /privbot status