-
Notifications
You must be signed in to change notification settings - Fork 0
/
data.py
32 lines (28 loc) · 776 Bytes
/
data.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
from dataclasses import dataclass
import json
@dataclass
class botInfo:
"""
for easy loading data
add some more if you want like admin id
bannedUsers etc. etc. lazy to do ;)
"""
prefix: str
owner: str
owner_fb: str
BotAdmin: list
owner_age: int
owner_gender: str
BOT = "\x1B[1;38;5;210m[ Togashi ]->\x1B[0m"
def load_botinfo():
with open("./config.json", "r") as f:
data = json.load(f)
botInfo.prefix = data["PREFIX"]
botInfo.owner = data["OWNER"]
botInfo.BotAdmin = data["BOTADMIN"]
botInfo.owner_fb = data["FACEBOOK"]
botInfo.owner_age = data["AGE"]
botInfo.owner_gender = data["GENDER"]
load_botinfo()
if __name__ == "__main__":
print("Loading bot data")