From e5c66265f35c220a4917006c96df4419a4243d28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Ml=C3=A1dek?= Date: Thu, 2 May 2019 19:26:39 +0200 Subject: [PATCH] fix tagging directly sent files --- delojza.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/delojza.py b/delojza.py index f0c3a9c..65536df 100755 --- a/delojza.py +++ b/delojza.py @@ -251,9 +251,8 @@ class DelojzaBot: reply += ' to "' + hashtag + '"' reply += '...' - audio = False - if any([tag in hashtag for tag in ('AUDIO', 'RADIO')]) and download_fn != self.download_raw: - audio = True + audio = any([tag in hashtag for tag in ('AUDIO', 'RADIO')]) + if audio and download_fn != self.download_raw: reply += ' (And also guessing you want to extract the audio)' message.reply_text(reply)