999catbot/main.py

28 lines
534 B
Python

import os
import time
from bot.catbot import CatBot
from server.server import Server
SERVER_BASE_URL = "https://kaylee.wtf/cats/";
cats = []
def run_bot():
global cb
cb = CatBot(SERVER_BASE_URL, cats)
def run_server():
global s
s = Server(cats)
import threading
# run bot (and server which allows users to upload cat images)
if __name__=="__main__":
t1 = threading.Thread(target=run_bot)
t2 = threading.Thread(target=run_server)
t1.start()
t2.start()
t1.join()
t2.join()
print("done")