From d2c951bbbef534eab5bad5b7aee3b90137552f99 Mon Sep 17 00:00:00 2001 From: graynk Date: Sat, 12 Jun 2021 15:49:16 +0500 Subject: [PATCH] text filter to ignore non-lang codes replies --- bot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot.py b/bot.py index ab1e8e5..0ad9483 100644 --- a/bot.py +++ b/bot.py @@ -121,7 +121,7 @@ def download_and_prep(file_name: str, message: Message, voice: Voice) -> bool: if __name__ == '__main__': start_handler = CommandHandler('start', start) voice_handler = MessageHandler(Filters.voice & DateFilter(), voice_to_text, run_async=True) - language_handler = MessageHandler(Filters.reply & DateFilter(), transcribe_with_langcode, run_async=True) + language_handler = MessageHandler(Filters.reply & Filters.text & DateFilter(), transcribe_with_langcode, run_async=True) dispatcher.add_handler(start_handler) dispatcher.add_handler(voice_handler)