Skip to content

Environment Variables

File location: ~/.disclaw-team/.env

Purpose: Stores Discord bot tokens. File permissions are set to 0600 (readable only by you) on creation.

Format:

Terminal window
BOT_1_TOKEN=MTA0NjU3...
BOT_2_TOKEN=MTI1NDg4...
BOT_3_TOKEN=MTY5MDA2...

Token naming formula:

Token env var names are derived from bot IDs in bots.yaml. The formula:

  • Uppercase the bot ID
  • Replace non-alphanumeric characters with underscores
  • Append _TOKEN
Bot IDToken env var
bot-1BOT_1_TOKEN
my-botMY_BOT_TOKEN
researcherRESEARCHER_TOKEN

Special environment variables:

VariableDescription
DISCORD_ACCESS_MODE=staticFreezes each bot’s access.json at startup. Converts pairing mode to allowlist mode. Prevents runtime pairing changes.

Related: bots.yaml, CLI: init