999catbot/main.py

28 lines
534 B
Python
Raw Normal View History

2024-02-23 01:53:21 +00:00
import os
import time
from bot.catbot import CatBot
from server.server import Server
SERVER_BASE_URL = "https://kaylee.wtf/cats/";
2024-02-23 02:21:19 +00:00
cats = []
2024-02-23 01:53:21 +00:00
def run_bot():
global cb
2024-02-23 02:21:19 +00:00
cb = CatBot(SERVER_BASE_URL, cats)
2024-02-23 01:53:21 +00:00
def run_server():
global s
2024-02-23 02:21:19 +00:00
s = Server(cats)
2024-02-23 01:53:21 +00:00
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")