Sell
Discord bot
Issue, look up, and reset licenses from your Discord server.
Commands#
| Command | Who | What it does |
|---|---|---|
| /license create | Staff | Issues 1–25 keys, shown only to you |
| /license info | Staff | Status, expiry, and devices |
| /license reset | Staff | Releases every device on a key |
| /license suspend · reinstate · revoke | Staff | Changes a key's status |
| /reset-devices | Everyone | Customer self-service reset, if your product allows it |
Staff means members with Manage Server, or roles you list. Every reply is visible only to the person who ran the command.
Set it up#
- Create an application in the Discord developer portal, add a bot, and note the application ID, public key, and bot token.
- Create an Atlas secret key with
products:readandlicenses:write. - Deploy
apps/discord-botanywhere that serves HTTPS, with the settings below, and runpnpm registeronce. - Set the application's Interactions Endpoint URL to
https://your-host/interactions.
bash
DISCORD_APPLICATION_ID=...
DISCORD_PUBLIC_KEY=...
DISCORD_BOT_TOKEN=...
DISCORD_STAFF_ROLE_IDS=123,456 # optional
ATLAS_API_KEY=sk_live_...
ATLAS_PRODUCT_ID=prod_...
ATLAS_PUBLISHABLE_KEY=pk_live_... # optional, enables /reset-devices
ATLAS_SIGNING_PUBLIC_KEY=MCowBQYD... # required with the publishable key