-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconstants.py
40 lines (34 loc) · 1.33 KB
/
constants.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
"""Constants for the bot."""
import json
import os
if os.path.isfile("./config.json"):
with open("config.json", encoding="UTF-8") as config:
config_file = json.load(config)
else:
with open("example_config.json", encoding="UTF-8") as example_config:
config_file = json.load(example_config)
DISCORD_TOKEN = os.getenv("DISCORD_TOKEN") or config_file["discord_token"]
NEW_COMMIT_NAME = os.getenv("RAILWAY_GIT_COMMIT_SHA") or "Local Test"
TESTING_GUILDS = [1144719525728763915]
PRIVILEGED_GUILDS = [1144719525728763915]
DEV_SUCCESSFUL_LOGS = 1161825015587680256
DEV_FAILED_LOGS = 1161824917021536256
DEV_ERROR_LOGS = 1259641880015147028
DEV_REGISTRATIONS = 1183881158254137394
DEV_UPDATE_LOGS = 1259641880015147028
DEV_CONTRIBUTOR_ROLE = 1144720671558078485
DEV_DISCORD_LINK = "https://discord.gg/qcQBD3CAAw"
DEV_OWNER_ID = 719269842276057280
DB_URL = os.getenv("MONGO_URL") or config_file["db_connection_string"]
VERSION = os.getenv("BOT_VERSION") or config_file["version"] or "dev"
API_PASSWORD = os.getenv("BOT_API_PASSWORD") or None
port_env: str | None = os.getenv("PORT")
PORT: int
if port_env is not None:
PORT = int(port_env)
else:
PORT = 8000
BOT_COLOR = 0xF0984D
GITHUB_API_KEY = os.getenv("GITHUB_API_KEY") or None
RAILWAY_API_KEY = os.getenv("RAILWAY_API_KEY") or None
SERVEME_API_KEY = os.getenv("serveme_key") or None