-
-
Notifications
You must be signed in to change notification settings - Fork 51
Expand file tree
/
Copy pathmain.py
More file actions
executable file
·31 lines (21 loc) · 664 Bytes
/
main.py
File metadata and controls
executable file
·31 lines (21 loc) · 664 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
28
29
30
31
import argparse
import database.db_migrations as migrations
from config.app_config import config
from features.error import ErrorLogger
from features.logger import setup_logging
from rubbergod import Rubbergod
setup_logging()
parser = argparse.ArgumentParser()
parser.add_argument("--init_db", action="store_true", help="Creates missing DB tables without start bot.")
args = parser.parse_args()
if args.init_db:
migrations.init_db()
exit(0)
class Bot(Rubbergod):
def __init__(self):
super().__init__()
# Features
self.err_logger = ErrorLogger(self)
self.init_cogs()
rubbergod = Bot()
rubbergod.run(config.key)