diff --git a/bot.py b/bot.py index c271dc3..2eaa565 100644 --- a/bot.py +++ b/bot.py @@ -96,7 +96,7 @@ def handle_vvs(update, context): departures = get_vvs_departures(query) for reply in departures: - update.message.reply_text(reply) + update.message.reply_text(reply, disable_notification=True) def parse_station(args): @@ -168,12 +168,17 @@ def error_callback(update, context): return -inline_station_search_handler = InlineQueryHandler(inline_station_search) +def __main__(): + inline_station_search_handler = InlineQueryHandler(inline_station_search) + dispatcher.add_handler(inline_station_search_handler) + dispatcher.add_handler(CommandHandler('vvs', handle_vvs)) -dispatcher.add_handler(inline_station_search_handler) -dispatcher.add_handler(CommandHandler('vvs', handle_vvs)) -dispatcher.add_error_handler(error_callback) -dispatcher.add_handler(CallbackQueryHandler(handle_multiple_stations_reply)) + dispatcher.add_error_handler(error_callback) -updater.start_polling() -updater.idle() + dispatcher.add_handler(CallbackQueryHandler(handle_multiple_stations_reply)) + updater.start_polling() + updater.idle() + + +if __name__ == "__main__": + __main__()