diff options
author | 2021-07-27 13:52:36 -0700 | |
---|---|---|
committer | 2021-07-27 13:54:10 -0700 | |
commit | 741c0dc44e2d8c519564d1477f8d168d82eb572e (patch) | |
tree | ffc7529a445de4b3803b3dfd84ed09ef2700b58d | |
parent | Prevent ghost-pings in pypi command (#1696) (diff) |
Specify DEBUG_MODE via the config file
The `SITE_URL` environment variable hasn't been used by anything else
for a long time. It wouldn't have been reliable to look for "local"
anyway since the Docker hostname may be used.
-rw-r--r-- | bot/constants.py | 2 | ||||
-rw-r--r-- | config-default.yml | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/bot/constants.py b/bot/constants.py index 500803f33..b7c6ffa70 100644 --- a/bot/constants.py +++ b/bot/constants.py @@ -687,7 +687,7 @@ class VideoPermission(metaclass=YAMLGetter): # Debug mode -DEBUG_MODE = 'local' in os.environ.get("SITE_URL", "local") +DEBUG_MODE: bool = _CONFIG_YAML["debug"] # Paths BOT_DIR = os.path.dirname(__file__) diff --git a/config-default.yml b/config-default.yml index 811640034..40c6d691e 100644 --- a/config-default.yml +++ b/config-default.yml @@ -1,3 +1,6 @@ +debug: false + + bot: prefix: "!" sentry_dsn: !ENV "BOT_SENTRY_DSN" |