From 4d74e08b001ff4f26639f35dac922e664b40d658 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Ml=C3=A1dek?= Date: Wed, 22 May 2019 12:11:52 +0200 Subject: [PATCH] cosmetics; make clear that the first hashtag is a special one --- delojza.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/delojza.py b/delojza.py index 13608df..ba78084 100755 --- a/delojza.py +++ b/delojza.py @@ -287,10 +287,12 @@ class DelojzaBot: message.reply_text(reply) filenames = download_fn(urls, out_path, message.date, message, audio=audio, filename=filename) - tumblr_ids = [] - if hashtags[0] in ('TUMBLR', 'TUMBLR_NOW') and self.tumblr_client: - now = hashtags[0] == 'TUMBLR_NOW' + cmd_hashtag = hashtags[0] + + tumblr_ids = [] + if cmd_hashtag in ('TUMBLR', 'TUMBLR_NOW') and self.tumblr_client: + now = cmd_hashtag == 'TUMBLR_NOW' reply = '(btw, {})'.format("***FIRING TO TUMBLR RIGHT AWAY***" if now else "queueing to tumblr") message.reply_text(reply, parse_mode=telegram.ParseMode.MARKDOWN) for filename in filenames: