-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmain.py
47 lines (36 loc) · 979 Bytes
/
main.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
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
###########
# Imports #
###########
import config
import example_bot
#################################
# Start the bot to pv and rooms #
#################################
def main_file():
example_bot_v = example_bot.ExampleBot(
accounts=config.Bot.accounts,
pm=config.Bot.pm_connect
)
try:
text_i = config.Database.take_lang_bot(config.Bot.bot_lang, "start")
text_f = text_i.format(config.Files.delete_pycache())
print(text_f)
# Load database.
config.Database.load_all()
# Start rooms.
config.Tools.start_connections(
example_bot_v,
ignore_room=["for_pm"],
anon_room=[]
)
# Start bot.
example_bot_v.main()
except (Exception, BaseException):
print("Error: {}".format(str(config.Tools.error_def())))
if __name__ == "__main__":
main_file()
#######
# End #
#######