look up most recent tweet by username
This commit is contained in:
parent
e4edc7f6f4
commit
7e4e6ab23f
@ -87,6 +87,13 @@ class Twitter(Module):
|
||||
return self.reply(connection, replypath, tweet.user.name + ': ' + tweet.text)
|
||||
except twitter.TwitterError as e:
|
||||
return self.reply(connection, replypath, 'Couldn\'t obtain status: ' + str(e))
|
||||
elif whats[1] == 'user' and len(whats) == 3:
|
||||
try:
|
||||
tweets = self.twit.GetUserTimeline(screen_name=whats[2], count=1, include_rts=False)
|
||||
tweet = tweets[0]
|
||||
return self.reply(connection, replypath, tweet.user.name + ': ' + tweet.text)
|
||||
except twitter.TwitterError as e:
|
||||
return self.reply(connection, replypath, 'Couldn\'t obtain status: ' + str(e))
|
||||
|
||||
# vi:tabstop=4:expandtab:autoindent
|
||||
# kate: indent-mode python;indent-width 4;replace-tabs on;
|
||||
|
Loading…
Reference in New Issue
Block a user