-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMain.py
30 lines (21 loc) · 840 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
# coding=utf-8
import time
from Globals import config
from Bot.Main import TeamspeakBot
def main():
teamspeak_query_host = config.get_value("serverquery.host")
teamspeak_query_user = config.get_value("serverquery.user")
teamspeak_query_password = config.get_value("serverquery.password")
teamspeak_query_virtual_server_id = config.get_value("serverquery.virtualserverid")
bot = TeamspeakBot(teamspeak_query_host, user=teamspeak_query_user, password=teamspeak_query_password,
virtual_server_id=teamspeak_query_virtual_server_id)
success = bot.connect()
if not success:
print("Error connecting to teamspeak server query interface.")
exit()
bot.login_use()
while True:
time.sleep(10 / 1000)
bot.process()
if __name__ == "__main__":
main()