Spectrum is a Discord Bot that allows users to self-assign color roles.
Important
Discord API credentials for a Bot user are required.
Edit and run this compose.yaml example with docker compose up -d.
services:
spectrum:
container_name: Spectrum
image: ghcr.io/ethanc/spectrum:latest
environment:
PUID: 1000
PGID: 1000
LOG_LEVEL: INFO
LOG_DISCORD_WEBHOOK_URL: https://discord.com/api/webhooks/XXXXXXXX/XXXXXXXX
LOG_DISCORD_WEBHOOK_LEVEL: WARNING
DISCORD_BOT_TOKEN: XXXXXXXX
DISCORD_SERVER_IDS: 0000000000
ports:
- 7732:8080
volumes:
- /path/to/spectrum:/data
restart: unless-stoppedExpose the Spectrum instance publicly over HTTPS on port 7732, then set the Interactions Endpoint URL in the Discord Developer Panel to that address.
Note
Spectrum targets Python 3.14 and newer. Compatibility with earlier versions is not guaranteed.
Install Python and the required dependencies with uv:
uv sync
Rename .env.example to .env and configure your environment.
Run Spectrum with uv.
uv run spectrum.py -OO
Expose the Spectrum instance publicly over HTTPS on port 7732, then set the Interactions Endpoint URL in the Discord Developer Panel to that address.
All configuration is managed through environment variables on the system hosting the Bot instance.
| Environment Variable | Description | Default |
|---|---|---|
PUID |
Docker container setting for the numeric Linux user ID used to run Spectrum and own files under /data. |
1000 |
PGID |
Docker container setting for the numeric Linux group ID used to run Spectrum and own files under /data. |
1000 |
LOG_LEVEL |
Loguru level of log events to print to the console. | INFO |
LOG_DISCORD_WEBHOOK_URL |
Discord Webhook URL to forward log events to. | N/A |
LOG_DISCORD_WEBHOOK_LEVEL |
Loguru level of log events to forward to Discord. | N/A |
STORAGE_PATH |
Path to where the JSON persistent storage is stored. The Docker image uses /data/spectrum.json. |
./spectrum.json |
DISCORD_BOT_TOKEN (Required) |
Discord API credentials for your Bot user. | N/A |
DISCORD_SERVER_IDS (Required) |
Comma-separated list of Discord server IDs to sync commands to. | N/A |
Spectrum is not affiliated with or endorsed by Activision or Discord.
All trademarks and assets belong to their respective owners.