From 1d7b7edcf64b9a7ba3f2e5a00d55f607ef77e83d Mon Sep 17 00:00:00 2001 From: Melody Horn Date: Thu, 18 Jun 2020 23:48:33 -0600 Subject: a few tiny things --- bot.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bot.py b/bot.py index 5b77632..d9392ff 100644 --- a/bot.py +++ b/bot.py @@ -179,6 +179,7 @@ WEBHOOK = '/webhook/' + TOKEN @app.route(WEBHOOK, methods=['POST']) def webhook(): update_queue.put(telegram.Update.de_json(request.get_json(), bot)) + return 'ok' bot = telegram.Bot(token=TOKEN) @@ -188,7 +189,7 @@ dp = Dispatcher(bot, update_queue, use_context=True) # Add handlers dp.add_handler(CommandHandler('start', start)) dp.add_handler(InlineQueryHandler(inline_query)) -dp.add_handler(MessageHandler(Filters.all, message)) +dp.add_handler(MessageHandler(Filters.text, message)) thread = Thread(target=dp.start, name='dispatcher') thread.start() -- cgit v1.2.3