Configuration Reference¶
Configuration keys phpbotscout reads, with types, defaults, and the environment-variable mapping.
Every key is readable from a config file, an environment variable under the
PHPBOTSCOUT prefix, or any other source the store is given. See
Run the bot for a worked example.
discord¶
| Key | Type | Default | Meaning |
|---|---|---|---|
discord.guilds |
list | required | Guilds to serve. Exactly one entry is accepted in v1; the list shape exists so multi-guild is additive later rather than a breaking migration. |
discord.guilds[].space |
string | required | The guild (server) ID. Not a lookup — the gateway supplies the guilds the bot is in. It is an authorisation boundary, so a shared invite link cannot turn an unintended server into one the bot serves. |
discord.guilds[].channels |
list of string | required | The channel allowlist. Fails closed: an empty list permits nothing and is rejected at startup. |
discord.guilds[].auth.env |
string | DISCORD_PHPBOTSCOUT_TOKEN |
Name of the environment variable holding the bot token. Recommended, and the only mode permitted under CI=true. |
discord.guilds[].auth.keychain |
string | — | OS keychain entry as service/account. |
discord.guilds[].auth.value |
string | — | The token itself. Refused under CI=true. |
Exactly one auth mode may be set. Two is an error rather than a preference,
because silently choosing one of them is the wrong behaviour where a credential
is concerned.
health¶
| Key | Type | Default | Meaning |
|---|---|---|---|
health.host |
string | 127.0.0.1 |
Interface the health listener binds. Wildcards (0.0.0.0, ::, empty) are rejected — binding every interface and relying on a firewall being correct is how private services become public ones. |
health.port |
int | 8081 |
Port for /healthz, /livez and /readyz. |
Hot-reload¶
discord.guilds[].channels applies immediately. space and auth are read
once at start and require a restart, logging a warning that names the field so
an ignored change is never a silent one.