From 6116594eb4e6baca47ffd030b58f6ed53d7b897e Mon Sep 17 00:00:00 2001 From: Ceda EI Date: Sat, 24 Apr 2021 12:43:22 +0530 Subject: [PATCH] [fix] Re-order dispatchers so that /s?q_\d* commands work --- bot.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bot.py b/bot.py index 8a2179f..449ef0e 100755 --- a/bot.py +++ b/bot.py @@ -631,7 +631,7 @@ with open('schema.sql') as f: cursor.executescript(f.read()) db.commit() -updater = Updater(token=config.api_key) +updater = Updater(token=config.api_key, use_context=False) dispatcher = updater.dispatcher dispatcher.add_handler(CommandHandler('start', start)) @@ -642,12 +642,12 @@ dispatcher.add_handler(CommandHandler('cancel', lambda x, y: me_handler(x, y, db))) dispatcher.add_handler(CommandHandler('help', lambda x, y: help_command(x, y, db))) -dispatcher.add_handler(MessageHandler(Filters.text, lambda x, y: - message_handling(x, y, db))) dispatcher.add_handler(RegexHandler(r"/[Ss]?[Qq]_\d+", lambda x, y: quest_handling(x, y, db))) dispatcher.add_handler(MessageHandler(Filters.command, lambda x, y: message_handling(x, y, db))) +dispatcher.add_handler(MessageHandler(Filters.text, lambda x, y: + message_handling(x, y, db))) if config.update_method == "polling": updater.start_polling()