aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.snekrc6
-rw-r--r--bot/constants.py5
2 files changed, 3 insertions, 8 deletions
diff --git a/.snekrc b/.snekrc
deleted file mode 100644
index 9f582f477..000000000
--- a/.snekrc
+++ /dev/null
@@ -1,6 +0,0 @@
-[all]
-linters = flake8, safety, dodgy
-
-[flake8]
-max-line-length=120
-application_import_names=bot
diff --git a/bot/constants.py b/bot/constants.py
index 00b3fcb6c..c73069632 100644
--- a/bot/constants.py
+++ b/bot/constants.py
@@ -28,8 +28,9 @@ CLICKUP_TEAM = 754996
DEPLOY_URL = os.environ.get("DEPLOY_URL")
STATUS_URL = os.environ.get("STATUS_URL")
SITE_URL = os.environ.get("SERVER_NAME", "pythondiscord.local:8080")
-SITE_API_USER_URL = f"https://api.{SITE_URL}/user"
-SITE_API_TAGS_URL = f"https://api.{SITE_URL}/tags"
+SITE_PROTOCOL = 'http' if 'local' in SITE_URL else 'https'
+SITE_API_USER_URL = f"{SITE_PROTOCOL}://api.{SITE_URL}/user"
+SITE_API_TAGS_URL = f"{SITE_PROTOCOL}://api.{SITE_URL}/tags"
GITHUB_URL_BOT = "https://github.com/discord-python/bot"
BOT_AVATAR_URL = "https://raw.githubusercontent.com/discord-python/branding/master/logos/logo_circle.png"