forked from Zevphyr/Balerion
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun.py
46 lines (35 loc) · 1.19 KB
/
run.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
import sys
import logging
ascii = """
#"""""""'M dP oo
## mmmm. `M 88
#' .M .d8888b. 88 .d8888b. 88d888b. dP .d8888b. 88d888b.
M# MMMb.'YM 88' `88 88 88ooood8 88' `88 88 88' `88 88' `88
M# MMMM' M 88. .88 88 88. ... 88 88 88. .88 88 88
M# .;M `88888P8 dP `88888P' dP dP `88888P' dP dP
M#########M
oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo"""
# Setup initial loggers
log = logging.getLogger('Balerion')
log.setLevel(logging.DEBUG)
sh = logging.StreamHandler(stream=sys.stdout)
sh.setFormatter(logging.Formatter(
fmt="[%(asctime)s] - %(levelname)s: %(message)s"
))
sh.setLevel(logging.INFO)
log.addHandler(sh)
def bye_bye(msg="Press enter to continue . . .", code=1):
input(msg)
sys.exit(code)
def run():
try:
from Balerion.balerion_main import Balerion
b = Balerion()
print(ascii)
print("Connecting...\n")
b.run()
except Exception as e:
log.warning(f"Closing bot : {e}")
bye_bye()
if __name__ == "__main__":
run()