Developers

Dashboard & API

How rival.cx talks to the bot, and what it can and can't do.

The website and the bot are separate programs. The website handles your Discord login; the bot owns your server's settings.

  1. You log in with Discord. The website keeps a signed session cookie — never your Discord password.
  2. When the dashboard needs data, the website forwards the request to the bot and signs it (HMAC-SHA256 over your user id and a timestamp) with a secret only they share.
  3. The bot rejects anything unsigned or older than five minutes, then checks you have Manage Server in that server.
  4. Your change is saved and applies instantly — no restart, no re-invite.
Example
x-bounty-user: 1234567890
x-bounty-ts:   1763164800000
x-bounty-sig:  hex(HMAC_SHA256(secret, "1234567890.1763164800000"))

Removing someone's Manage Server role removes their dashboard access at once: permissions are re-checked on every request.

Answered questions

Still stuck? Ask on the support forum. Answers to common questions are added here.