No description
- TypeScript 98.6%
- Dockerfile 1.4%
| src | ||
| .dockerignore | ||
| .env.example | ||
| .gitignore | ||
| Dockerfile | ||
| package.json | ||
| pnpm-lock.yaml | ||
| README.md | ||
| tsconfig.json | ||
role-master
TypeScript Discord bot for fake role pings and role analysis. It runs on Node's built-in TypeScript stripping through Discord Gateway, so it does not need ngrok or a public HTTP endpoint.
Groups are stored in SQLite and scoped per server.
Setup
pnpm install
cp .env.example .env
Requires Node 24 or newer.
Fill in .env:
DISCORD_BOT_TOKEN=...
DISCORD_APPLICATION_ID=...
DB_FILE=data/role-master.sqlite
Discord setup
- Create an app in the Discord Developer Portal.
- Bot tab: create/reset token and put it in
DISCORD_BOT_TOKEN. - General Information: copy Application ID into
DISCORD_APPLICATION_ID. - Bot tab: enable Server Members Intent for
/analyze-roles. - OAuth2 URL Generator:
- scopes:
bot,applications.commands - bot permissions: View Channels, Send Messages, Read Message History
- scopes:
- Open the generated invite URL and add it to any servers you want.
Run
pnpm run dev
The bot registers global slash commands on startup. Global commands can take a bit to appear across servers.
Docker
docker build -t role-master .
docker run --rm \
-e DISCORD_BOT_TOKEN=... \
-e DISCORD_APPLICATION_ID=... \
-v role-master-data:/data \
role-master
For Coolify, set the env vars above and persist /data.
Commands
/ping group:pato: public message mentioning users from the configured group/group create group:pato/group add group:pato user:@thomas/group remove group:pato user:@thomas/group list/group show group:pato/group delete group:pato/analyze-roles mention-days:30: role member counts plus role mention counts from readable channel history