diff --git a/bottools/methods.py b/bottools/methods.py index 619d6e8..04bb671 100644 --- a/bottools/methods.py +++ b/bottools/methods.py @@ -323,6 +323,10 @@ def explicitTweet(bot, update, args, reply = None): def getMentions(tweet, two, args = []): sender = tweet.user.screen_name + + if "@%s" % sender.strip("@") in args: + return [] + try: text = tweet.full_text except: @@ -337,7 +341,7 @@ def getMentions(tweet, two, args = []): except: pass - if not sender.strip("@") == two.whoami().strip("@") and not "@%s" % sender.strip("@") in mentions: + if not (sender.strip("@") == two.whoami().strip("@") or "@%s" % sender.strip("@") in mentions): mentions = ["@%s" % sender.strip("@")] + mentions return mentions