telegram: shorten polling

This commit is contained in:
Egg 2024-10-09 17:09:35 +02:00
parent a7c8caccb4
commit c7b00227b7

View file

@ -13,9 +13,9 @@ class TelegramBot(Bot):
try:
updates = tb.get_updates(offset=seen_tg + 1,
allowed_updates="message",
timeout=5).wait()
timeout=1).wait()
except TypeError:
updates = tb.get_updates(timeout=5).wait()
updates = tb.get_updates(timeout=1).wait()
reports = []
if updates == None:
return reports