From 4306a2ccb14591b1ac62b714c04ebbb944158cd2 Mon Sep 17 00:00:00 2001 From: Klaus-Uwe Mitterer Date: Tue, 28 Mar 2017 16:08:06 +0200 Subject: [PATCH] Re-enable tweeting directly by caption --- bottools/methods.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/bottools/methods.py b/bottools/methods.py index 9ec4d53..984bebc 100644 --- a/bottools/methods.py +++ b/bottools/methods.py @@ -59,14 +59,17 @@ def captionHelper(bot, update): else: args = update.message.caption.split() - try: - feature = commands[args[0][1:]] + if args[0].startswith("/"): try: - status = feature(bot, update, args[1:]) + feature = commands[args[0][1:]] + try: + feature(bot, update, args[1:]) + except: + feature(bot, update) except: - status = feature(bot, update) - except: - update.message.reply_text(bottools.strings.unknownCommand) + update.message.reply_text(bottools.strings.unknownCommand) + else: + explicitTweet(bot, update, args) def mentionHelper(bot, update): args = update.message.text.split()