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 settings
  • dev.env (from dev.env.example): optional developer settings

Essential settings (.env)

VariableRequiredDefaultDescription
DISCORD_TOKENYesDiscord bot token(s) from the Developer Portal. Comma-separate tokens for multi-bot mode.
SPOTIFY_CLIENT_IDFor SpotifySpotify API client ID from the Spotify dashboard.
SPOTIFY_CLIENT_SECRETFor SpotifySpotify API client secret.
STEGRIPE_API_LYRICS_TOKENNoImproves lyrics accuracy. Ask in the Stegripe Discord.
MAIN_PREFIXNo!Main command prefix.
MAIN_SERVERNoMain server ID for slash command registration.
DEVSNoBot developer IDs (comma-separated).
LOCALENoen-USBot language.
ACTIVITY_TYPESNoPLAYINGActivity types, comma-separated: PLAYING, WATCHING, LISTENING, COMPETING.
ACTIVITIESNoStatus activities, comma-separated. Supports {prefix}, {userCount}, {textChannelCount}, {serverCount}, {playingCount}, {username}.
STEGRIPE_API_URLNohttps://api.stegripe.orgStegripe service URL.
CDN_BASE_URLNohttps://cdn.stegripe.orgStegripe CDN URL.
HASTE_URLNohttps://bin.stegripe.orgHaste (paste) service URL.

Developer settings (dev.env)

VariableDefaultDescription
ENABLE_PREFIXyesEnable/disable prefix commands.
ENABLE_SLASH_COMMANDyesEnable/disable slash commands.
ENABLE_SHARDINGnoSharding for large bots (single token mode only).
DEVTOOLS_PORT3000Port for the Chrome DevTools remote debugging proxy used by login.
CHROMIUM_PATHautoPath to Chrome/Chromium for Google login.
NODE_ENVproductionproduction or development.
DEBUG_MODEnoEnable 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]

Type to search the documentation.