Merge pull request 'types' (#23) from master into dev

Reviewed-on: #23
This commit is contained in:
emmatveev 2024-11-30 12:59:01 +03:00
commit cf12a0dca8

View File

@ -45,7 +45,7 @@ class Daemon(base.Daemon):
time.sleep(10)
def start_polling(self, bot: telebot.TeleBot, queue: str) -> threading.Thread:
@bot.message_handler()
@bot.message_handler(content_types=['audio', 'photo', 'voice', 'video', 'document', 'text', 'location', 'contact', 'sticker', 'video_note'])
def do_action(message: telebot.types.Message):
queues.set_task(queue, message.json, 1)
thread = threading.Thread(target=bot.polling)