diff --git a/robot.py b/robot.py index 27ddbaf..3c522bf 100755 --- a/robot.py +++ b/robot.py @@ -139,9 +139,14 @@ def handle_rest(bot, update): url = bot.getFile(file).file_path logger.info("Downloading %s" % url) hashtag = get_first_hashtag(update.message) + reply = 'Downloading' + if hashtag: + mkdir_p(f'{OUT_DIR}/{hashtag}') + reply += f' to "{hashtag}"' + reply += '...' + update.message.reply_text(reply) if hashtag: mkdir_p(f'{OUT_DIR}/{hashtag}') - update.message.reply_text('Downloading%s...' % f' to "{hashtag}"' if hashtag else '') download_raw(url, hashtag or '.', update.message.date) except: type, value, _ = sys.exc_info()