made the @ for the twitter command optional.

This commit is contained in:
jesopo 2016-03-31 12:10:18 +01:00
parent 810ba3f0bb
commit 1c00b20d51
No known key found for this signature in database
GPG key ID: 0BBDEB2AEFCFFCB3

View file

@ -45,10 +45,12 @@ class Module(object):
except:
traceback.print_exc()
tweet = None
elif target.startswith("@"):
else:
if target.startswith("@"):
taret = target[1:]
try:
tweet = twitter_object.statuses.user_timeline(
screen_name=target[1:], count=1)[0]
screen_name=target, count=1)[0]
except:
traceback.print_exc()
tweet = None