From 5a636abf7e98a5687811167917d0e07103599bc8 Mon Sep 17 00:00:00 2001 From: Jan Tuomi Date: Sat, 19 Jul 2025 10:42:15 +0300 Subject: Vendor the unmaintained telepot dependency --- taulubot.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'taulubot.py') diff --git a/taulubot.py b/taulubot.py index 6b9c1a2..27f3b1b 100644 --- a/taulubot.py +++ b/taulubot.py @@ -1,7 +1,7 @@ import random import time from pprint import pprint -import telepot +from telepot import Bot from telepot.loop import MessageLoop import time from PIL import Image @@ -24,7 +24,7 @@ START_TIME = calendar.timegm(time.gmtime()) wooden_im.thumbnail(img_size) golden_im.thumbnail(img_size) -bot = telepot.Bot(BOT_TOKEN) +bot = Bot(BOT_TOKEN) logging.warning("Connected with token {}".format(BOT_TOKEN)) last_user_by_chat_id = {} @@ -136,6 +136,10 @@ def handle(msg): logging.warning("Listening...") -MessageLoop(bot, handle).run_forever( +MessageLoop(bot, handle).run_as_thread( allowed_updates=["message"], ) + +# Run forever +while True: + time.sleep(1) -- cgit v1.3