made the @ for the twitter command optional.
This commit is contained in:
parent
810ba3f0bb
commit
1c00b20d51
1 changed files with 4 additions and 2 deletions
|
@ -45,10 +45,12 @@ class Module(object):
|
||||||
except:
|
except:
|
||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
tweet = None
|
tweet = None
|
||||||
elif target.startswith("@"):
|
else:
|
||||||
|
if target.startswith("@"):
|
||||||
|
taret = target[1:]
|
||||||
try:
|
try:
|
||||||
tweet = twitter_object.statuses.user_timeline(
|
tweet = twitter_object.statuses.user_timeline(
|
||||||
screen_name=target[1:], count=1)[0]
|
screen_name=target, count=1)[0]
|
||||||
except:
|
except:
|
||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
tweet = None
|
tweet = None
|
||||||
|
|
Loading…
Reference in a new issue