aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar MarkKoz <[email protected]>2021-07-27 13:52:36 -0700
committerGravatar MarkKoz <[email protected]>2021-07-27 13:54:10 -0700
commit741c0dc44e2d8c519564d1477f8d168d82eb572e (patch)
treeffc7529a445de4b3803b3dfd84ed09ef2700b58d
parentPrevent 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.py2
-rw-r--r--config-default.yml3
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"