// 5 Steps

Quick Start

1

Install Dependencies

npm install
2

Configure Environment

cp .env.example .env

Fill in your .env file with the variables listed below.

3

Start the Bot

npm start

This boots the bot, initializes the SQLite database, loads announcements, registers slash commands, and starts the 30-second queue processor.

4

Setup Roles (in Discord)

/setup run        # Create all 150 tier roles
/setup status     # Check current status
/setup customize  # Customize role names/colors (optional)

The bot creates roles with a 400ms delay between each to respect Discord's rate limits. The full creation takes about 60 seconds.

5

Register Testers

/tester register @Player Sword,Axe --junior false

Only register players who are at least LT3 in their categories. Junior testers have restricted permissions.

Deploy Commands

npm run deploy

Use this script to register all slash commands with Discord. You can also use !sync while the bot is running. Commands are registered as guild commands (not global) for instant updates.

// Configuration

Environment Variables

All configuration is done through the .env file. Copy .env.example and fill in your values.

BOT_TOKEN Your Discord bot token from the Discord Developer Portal Required
CLIENT_ID Your bot's application ID (also from the Developer Portal) Required
GUILD_ID Your Discord server ID (enable Developer Mode → right-click server → Copy ID) Required
STAFF_ROLE_ID Role ID for staff members — required for !sync, !unsync, /tester register, /tester remove Required
TESTER_ROLE_ID Role ID for testers — required for /schedule_announce access Optional
TESTER_CHANNEL_ID Channel where new test assignments are announced Optional
RESULTS_CHANNEL_ID Channel where test results are posted publicly Optional
STAFF_CHANNEL_ID Channel for staff alerts (recusals, flags, etc.) Optional
PANEL_CHANNEL_ID Channel where appeal review requests are posted for the senior panel Optional

// Roles

Role Setup

/setup run

Creates all 150 tier roles (15 tiers × 10 categories). Supports dry_run:true to preview. Skips roles that already exist. Rate-limited: 400ms between creations.

/setup undo

Deletes all tier roles after a confirmation button click. Supports dry_run:true to preview. 60-second timeout on the confirmation.

/setup customize

Change how roles are named and colored. Settings are persisted to data/role_config.json. Use preview:true to see changes first.

/setup status

Shows how many roles exist, current name format, color strategy, and sample role names for the first 3 categories.

Important

Role hierarchy matters! Place the bot's role above the tier roles in your Discord server's role list, or it won't be able to assign them to users. Also ensure the bot has the Manage Roles permission.

Data Storage

All data is stored in data/tiers.db (SQLite via sql.js — pure JavaScript, no native dependencies). Role configuration is saved separately in data/role_config.json. Both are auto-created on first run.