Try to prevent empty mentions, i.e. '@'
This commit is contained in:
parent
f309a854c6
commit
2921c10fb6
|
@ -208,13 +208,13 @@ def reply(bot, update, args):
|
|||
|
||||
for m in re.split('[^\w@]+', otweet.text):
|
||||
try:
|
||||
if m[0] == "@":
|
||||
if m[0] == "@" and m[0].strip() != "":
|
||||
mentions += [m]
|
||||
except:
|
||||
pass
|
||||
|
||||
for m in mentions:
|
||||
if m in args or m =="@%s" % two.whoami().strip("@") or m == "@%s" % sender.strip("@"):
|
||||
if m in args or m.strip() == "" or m =="@%s" % two.whoami().strip("@") or m == "@%s" % sender.strip("@"):
|
||||
mentions.remove(m)
|
||||
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue