Environment variables
Settings in .env, dev.env and the setup command.
On this page
Rawon reads configuration from two files:
.env(from.env.example): essential settingsdev.env(fromdev.env.example): optional developer settings
Essential settings (.env)
| Variable | Required | Default | Description |
|---|---|---|---|
DISCORD_TOKEN | Yes | Discord bot token(s) from the Developer Portal. Comma-separate tokens for multi-bot mode. | |
SPOTIFY_CLIENT_ID | For Spotify | Spotify API client ID from the Spotify dashboard. | |
SPOTIFY_CLIENT_SECRET | For Spotify | Spotify API client secret. | |
STEGRIPE_API_LYRICS_TOKEN | No | Improves lyrics accuracy. Ask in the Stegripe Discord. | |
MAIN_PREFIX | No | ! | Main command prefix. |
MAIN_SERVER | No | Main server ID for slash command registration. | |
DEVS | No | Bot developer IDs (comma-separated). | |
LOCALE | No | en-US | Bot language. |
ACTIVITY_TYPES | No | PLAYING | Activity types, comma-separated: PLAYING, WATCHING, LISTENING, COMPETING. |
ACTIVITIES | No | Status activities, comma-separated. Supports {prefix}, {userCount}, {textChannelCount}, {serverCount}, {playingCount}, {username}. | |
STEGRIPE_API_URL | No | https://api.stegripe.org | Stegripe service URL. |
CDN_BASE_URL | No | https://cdn.stegripe.org | Stegripe CDN URL. |
HASTE_URL | No | https://bin.stegripe.org | Haste (paste) service URL. |
Developer settings (dev.env)
| Variable | Default | Description |
|---|---|---|
ENABLE_PREFIX | yes | Enable/disable prefix commands. |
ENABLE_SLASH_COMMAND | yes | Enable/disable slash commands. |
ENABLE_SHARDING | no | Sharding for large bots (single token mode only). |
DEVTOOLS_PORT | 3000 | Port for the Chrome DevTools remote debugging proxy used by login. |
CHROMIUM_PATH | auto | Path to Chrome/Chromium for Google login. |
NODE_ENV | production | production or development. |
DEBUG_MODE | no | Enable debug logging. |
Bot settings (setup command)
Bot-specific settings (embed color, yes/no emoji, splash, alt prefix, default volume, selection type and audio cache) are managed with the developer-only setup command and stored in the database.
!setup view
!setup <setting> [value]