rawon.jpg

rawon

Configuration

How Rawon’s configuration files and environment variables fit together.

πŸ“„ Configuration files

Settings are split across a few files on purpose:

  • .env.example β€” Essential settings (Discord/Spotify tokens, prefix, IDs, activities, etc.). Copy to .env and fill in values.

  • dev.env.example β€” Optional developer settings (prefix/slash toggles, sharding, DevTools port for !login, Chromium path, debug mode). Copy to dev.env when needed.

  • setup command β€” Bot-specific options (embed color, yes/no emoji, splash, alt prefix, default volume, selection type, audio cache) are managed via the setup command (developer-only) and stored in the database. Use <prefix>setup view to list available settings.

⚑ Essential settings (.env)

Values from .env.example. Only DISCORD_TOKEN is strictly required to run; add Spotify, lyrics token, and the rest as you need them.

DISCORD_TOKENRequired
Your Discord bot token(s) from the Discord Developer Portal. Use comma-separated tokens to enable multi-bot mode.
Spotify APIOptional
Set SPOTIFY_CLIENT_ID and SPOTIFY_CLIENT_SECRET from developer.spotify.com/dashboard. Required for Spotify support.
STEGRIPE_API_LYRICS_TOKENOptional
Required for accurate lyrics command output. Contact the developer for access.
MAIN_PREFIXDefault: !
Main command prefix. Example: ! means you type !play to play music
MAIN_SERVEROptional
Your main server ID for faster slash command registration. Leave empty for global commands (can take up to an hour to update)
DEVSOptional
Bot developer user IDs (comma-separated). Developers can access special commands including setup and login tooling.
LOCALEDefault: en-US
Bot language for bot responses

en-US, es-ES, fr-FR, id-ID, zh-CN, zh-TW, uk-UA, vi-VN, pt-BR, ru-RU, ja-JP, tr-TR, ko-KR

ACTIVITY_TYPESDefault: PLAYING
Activity types for each entry in ACTIVITIES (comma-separated). Must match the number of activities

PLAYING, WATCHING, LISTENING, COMPETING

ACTIVITIESOptional
Bot status lines under the bot name (comma-separated). Placeholders: {prefix}, {userCount}, {textChannelCount}, {serverCount}, {playingCount}, {username}

Example .env

1 2 3 4 5 6 7 8 9 10 11 # Essential (only DISCORD_TOKEN is required to run) DISCORD_TOKEN="" SPOTIFY_CLIENT_ID="" SPOTIFY_CLIENT_SECRET="" STEGRIPE_API_LYRICS_TOKEN="" MAIN_PREFIX="!" MAIN_SERVER="" DEVS="" LOCALE="en-US" ACTIVITY_TYPES="PLAYING, LISTENING, WATCHING, PLAYING" ACTIVITIES="My default prefix is {prefix}, music with {userCount} users"

πŸ”„ Multi-bot mode

Multi-bot mode is adaptive β€” no extra configuration. One token runs a single bot; comma-separated tokens enable multi-bot automatically.

Example:

DISCORD_TOKEN="token1, token2, token3"
  • The first token is the primary bot for general commands

  • Each bot serves music for users in its voice channel

  • If the primary bot is not in a server, the next available bot can take over

  • Each bot needs its own Discord application

πŸ› οΈ Developer settings (dev.env)

From dev.env.example. Optional β€” only change these if you understand them.

ENABLE_PREFIXDefault: yes
Enable or disable prefix commands (e.g. !play)

yes, no

ENABLE_SLASH_COMMANDDefault: yes
Enable or disable slash commands (e.g. /play)

yes, no

ENABLE_SHARDINGDefault: no
Enable sharding for large bots (single-token mode only)

yes, no

DEVTOOLS_PORTDefault: 3000
Port for the Chrome DevTools remote debugging proxy. Used by !login start when DevTools is opened from another machine. Default: 3000
CHROMIUM_PATHOptional
Path to Chrome/Chromium for Google login. Leave empty for auto-detection
NODE_ENVDefault: production
Runtime environment mode

production, development

DEBUG_MODEDefault: no
Verbose debug logging to the console

yes, no

Example dev.env

1 2 3 4 5 6 7 8 9 10 11 # Prefix / slash / sharding ENABLE_PREFIX="yes" ENABLE_SLASH_COMMAND="yes" ENABLE_SHARDING="no" # Login command (DevTools + Chromium) DEVTOOLS_PORT="" CHROMIUM_PATH="" NODE_ENV="production" DEBUG_MODE="no"