-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathmain.py
More file actions
27 lines (22 loc) · 761 Bytes
/
main.py
File metadata and controls
27 lines (22 loc) · 761 Bytes
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 os
import json
# Load configs for local hosting
path = 'config.json'
if os.path.isfile(path): # <-- file won't exist in production
with open(path) as f:
config = json.loads(f.read())
for key, value in config.items():
os.environ[key] = value
os.environ['test'] = '1'
print('Using test bot configs!')
from src.bot import run
print("""
____ _ ____ _ _
| _ \ (_) | _ \ | | | |
| |_) | __ _ ___ _ ___| |_) | ___ | |_| |
| _ < / _` / __| |/ __| _ < / _ \| __| |
| |_) | (_| \__ \ | (__| |_) | (_) | |_|_|
|____/ \__,_|___/_|\___|____/ \___/ \__(_)
""")
# Run the bot
app = run()