-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
main.py
44 lines (38 loc) · 1.18 KB
/
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
from components.Inside_Tester.main import CheckForDevAccounts, InsideTester
from Provider.DataBase.DataBase import DataBase
from BotVersion import BotVersion as version
import sqlite3
from components.Module_Installer.main import InstallAllModules
from components.Update_Script.main import Update, checkUpdateAndUpdate
try:
import pymsgbox as pg
except ModuleNotFoundError:
InstallAllModules()
checkUpdateAndUpdate()
CheckForDevAccounts()
connection = sqlite3.connect('AutoPoster.db')
cursor = connection.cursor()
DataBase.CheckOrCreateDefault()
import components.Post.Post
from components.App.AppManagement import getApps
config = cursor.execute('select * from "Bot Config"').fetchall()
connection.close()
def startTheBot():
BotName = config[0][0]
choice = pg.confirm(BotName, BotName,
buttons=["Post", "Inside Tester", "App Management"])
if choice == "Post":
components.Post.Post.Post()
elif choice == "App Management":
try:
getApps()
finally:
startTheBot()
elif choice == "Inside Tester":
try:
InsideTester()
finally:
startTheBot()
else:
exit()
startTheBot()