-
Notifications
You must be signed in to change notification settings - Fork 2
/
config.py
27 lines (23 loc) · 872 Bytes
/
config.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
import dotenv
import os
import json
import re
dotenv.load_dotenv()
with open("config.jsonc", "r") as r:
content = re.sub(r'//.*', '', r.read())
conf = json.loads(content)
class Config:
def __init__(self):
self.token = os.getenv("TOKEN")
self.prefix = conf["bot"]["prefix"]
self.mongo_uri = os.getenv("MONGO_URI")
self.osu = os.getenv("OSU_APIKEY")
self.whitelist_access = conf["bot"]["whitelist"]
self.whitelist_enabled = True
self.whitelist_dashboard = True # Enable dashboard so users can whitelist their server ?
self.whitelist_dashboard_link = "https://ethereal.jinxz.dev"
self.spotify_client_id = os.getenv("SPOTIFY_CLIENT_ID")
self.spotify_client_secret = os.getenv("SPOTIFY_CLIENT_SECRET")
# if __name__ == "__main__":
# config = Config()
# print(config.prefix)