diff options
| author | 2018-03-06 00:58:27 +0100 | |
|---|---|---|
| committer | 2018-03-06 00:58:27 +0100 | |
| commit | 9ddfb92d6b3bada51333222ff96b4e21c8ea5955 (patch) | |
| tree | 55c6fd8c6eca41d82b55385515e1f88a94977523 | |
| parent | math broke the bot, redeploying without math (diff) | |
cleaning up constants.py for readability and because I need dynamic API URLs for local testing, I need them in my life.
| -rw-r--r-- | bot/constants.py | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/bot/constants.py b/bot/constants.py index bf6f1ce2e..00b3fcb6c 100644 --- a/bot/constants.py +++ b/bot/constants.py @@ -1,6 +1,7 @@ # coding=utf-8 import os +# Channels, servers and roles PYTHON_GUILD = 267624335836053506 BOT_CHANNEL = 267659945086812160 @@ -18,26 +19,28 @@ VERIFIED_ROLE = 352427296948486144 OWNER_ROLE = 267627879762755584 DEVOPS_ROLE = 409416496733880320 +# Clickup CLICKUP_KEY = os.environ.get("CLICKUP_KEY") CLICKUP_SPACE = 757069 CLICKUP_TEAM = 754996 -TAG_COOLDOWN = 60 # Per channel, per tag - -GITHUB_URL_BOT = "https://github.com/discord-python/bot" -BOT_AVATAR_URL = "https://raw.githubusercontent.com/discord-python/branding/master/logos/logo_circle.png" - +# URLs 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" +GITHUB_URL_BOT = "https://github.com/discord-python/bot" +BOT_AVATAR_URL = "https://raw.githubusercontent.com/discord-python/branding/master/logos/logo_circle.png" +# Keys DEPLOY_BOT_KEY = os.environ.get("DEPLOY_BOT_KEY") DEPLOY_SITE_KEY = os.environ.get("DEPLOY_SITE_KEY") - SITE_API_KEY = os.environ.get("BOT_API_KEY") -SITE_API_USER_URL = "http://api.pythondiscord.com/user" -SITE_API_TAGS_URL = "http://api.pythondiscord.com/tags" +# Bot internals HELP_PREFIX = "bot." +TAG_COOLDOWN = 60 # Per channel, per tag # There are Emoji objects, but they're not usable until the bot is connected, # so we're using string constants instead |