diff options
| author | 2023-05-01 14:20:31 +0100 | |
|---|---|---|
| committer | 2023-05-06 13:20:46 +0100 | |
| commit | 64e1ac315daf4d17da02790859baebbbbb7bdfc4 (patch) | |
| tree | 15c3e2973685408b11272a34af1bc2de58580e28 /bot/constants.py | |
| parent | update Categories (diff) | |
update Client constants
This also renames the Client class to Bot, to align better with Python.
Diffstat (limited to '')
| -rw-r--r-- | bot/constants.py | 22 | 
1 files changed, 13 insertions, 9 deletions
| diff --git a/bot/constants.py b/bot/constants.py index 4c657ff9..ee7ab6d8 100644 --- a/bot/constants.py +++ b/bot/constants.py @@ -10,7 +10,7 @@ __all__ = (      "Cats",      "Channels",      "Categories", -    "Client", +    "Bot",      "Logging",      "Colours",      "Emojis", @@ -102,17 +102,21 @@ Categories = _Categories()  CODEJAM_CATEGORY_NAME = "Code Jam"  # Name of the codejam team categories -class Client(NamedTuple): +class _Bot(EnvConfig): +    EnvConfig.Config.env_prefix = "bot_" +      name = "Sir Lancebot" -    guild = int(environ.get("BOT_GUILD", 267624335836053506)) -    prefix = environ.get("PREFIX", ".") -    token = environ.get("BOT_TOKEN") -    debug = environ.get("BOT_DEBUG", "true").lower() == "true" -    in_ci = environ.get("IN_CI", "false").lower() == "true" -    github_bot_repo = "https://github.com/python-discord/sir-lancebot" +    guild = 267624335836053506 +    prefix = "." +    token = "" +    debug = True +    in_ci = False +    github_repo = "https://github.com/python-discord/sir-lancebot"      # Override seasonal locks: 1 (January) to 12 (December) -    month_override = int(environ["MONTH_OVERRIDE"]) if "MONTH_OVERRIDE" in environ else None +    month_override: int | None = None + +Bot = _Bot()  class Logging(NamedTuple):      debug = Client.debug | 
