A Discord bot that manages voice channels with user-controlled limits and automatic scaling. Named as a play on Harry Styles' "Sign of the Times".
| Command | Description | Permission |
|---|---|---|
/voicelimit set <limit> |
Set the channel user limit (0-99, 0 = unlimited) | Leader or override role |
/voicelimit remove |
Remove the channel user limit | Leader or override role |
/voicelimit info |
Show leader, member count, and limit | Anyone in the channel |
/lead transfer <user> |
Transfer leadership to another member in the channel | Leader or override role |
/lead info |
Show the current channel leader | Anyone in the channel |
/ping |
Check that the bot is responding and view latency | Everyone |
Requires Bun, Docker (for PostgreSQL), and a bot token from the Discord Developer Portal.
- Install dependencies:
bun install - Copy
.env.exampleto.envand fill in your credentials (see Configuration). - Start the database:
docker compose up -d - Run the bot:
bun run dev(orbun run startfor production).
On startup the bot initializes the database schema, deploys its slash commands, and syncs existing voice channels.
Set these as environment variables (typically in .env):
| Variable | Required | Default | Description |
|---|---|---|---|
DISCORD_TOKEN |
yes | Bot token | |
DISCORD_CLIENT_ID |
yes | Bot client ID | |
MANAGED_CATEGORIES |
yes | Comma-separated category IDs to manage | |
CATEGORY_NAMES |
no | Voice 1, Voice 2, ... |
Channel-name labels, in the same order as MANAGED_CATEGORIES. Does not rename the Discord category itself |
CHANNEL_NAME_TEMPLATE |
no | {category} {number} |
Name template; supports {category} and {number} |
MIN_TOTAL_CHANNELS |
no | 3 |
Minimum total channels per category |
BUFFER_CHANNELS |
no | 1 |
Minimum empty channels kept available per category |
OVERRIDE_ROLE_ID |
no | Role allowed to manage any channel | |
DATABASE_URL |
no | postgres://postgres:postgres@localhost:5432/vott |
PostgreSQL connection string |
LOG_LEVEL |
no | info |
debug, info, warn, or error |
NODE_ENV |
no | development |
development or production |
To find IDs, enable Developer Mode (User Settings -> Advanced), then right-click a category or role and Copy ID.
The default database credentials are for local development only. Before running anywhere exposed, set a strong POSTGRES_PASSWORD and update DATABASE_URL to match.
For a single category you can use the legacy MANAGED_CATEGORY_ID and CATEGORY_NAME variables instead.
- Leadership: the first person to join a channel becomes its leader and can set the user limit or transfer leadership. Leadership passes to the next member when the leader leaves and is cleared once the channel empties.
- Auto-scaling: after every join or leave, the bot keeps at least
MIN_TOTAL_CHANNELSchannels andBUFFER_CHANNELSempty ones per category, creating or deleting channels as needed. Occupied channels are numbered first. - Override: members with
OVERRIDE_ROLE_IDor the Administrator permission can manage any channel.
With MIN_TOTAL_CHANNELS=3 and BUFFER_CHANNELS=1, the bot creates 3 channels when none exist, and adds one more whenever every channel is occupied so an empty one is always available.
bun run dev # run with auto-reload
bun run typecheck # type-check
bun run lint # lint
bun run format:fix # format
bun test # unit testsSee CONTRIBUTING.md before opening a pull request, and review our Code of Conduct.