-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy pathconfig.py
67 lines (38 loc) · 1.2 KB
/
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
import os
import teapot
def bot_owner():
return eval(os.getenv('BOT_owner', "216127021028212737"))
def bot_token():
return os.getenv('BOT_TOKEN')
def osu_api_key():
return os.getenv('OSU_API_KEY')
def trn_api_key():
return os.getenv('TRN_API_KEY')
def bot_prefix():
return eval(os.getenv('BOT_PREFIX', "['/teapot ', '/tp']"))
def bot_status():
default_prefix = f'{", ".join(teapot.config.bot_prefix())} | Teapot.py {teapot.version()}'
try:
return eval(os.getenv('BOT_STATUS', default_prefix))
except:
return os.getenv('BOT_STATUS', default_prefix)
def storage_type():
if os.environ['STORAGE_TYPE'] != "mysql":
os.environ['STORAGE_TYPE'] = "flatfile"
return os.environ['STORAGE_TYPE']
def db_host():
return os.environ['DB_HOST']
def db_port():
return os.getenv('DB_PORT', "3306")
def db_schema():
return os.environ['DB_SCHEMA']
def db_user():
return os.environ['DB_USER']
def db_password():
return os.environ['DB_PASSWORD']
def lavalink_host():
return os.environ['LAVALINK_HOST']
def lavalink_port():
return os.environ['LAVALINK_PORT']
def lavalink_password():
return os.environ['LAVALINK_PASSWORD']