if the user has no location/description, don't show it
This commit is contained in:
parent
285c61fe11
commit
b42aac00d5
1 changed files with 13 additions and 3 deletions
|
@ -130,6 +130,16 @@ def twuser(inp, bot=None):
|
||||||
else:
|
else:
|
||||||
prefix = ""
|
prefix = ""
|
||||||
|
|
||||||
return u"{}@\x02{}\x02 ({}) is located in \x02{}\x02 and has \x02{:,}\x02 tweets and \x02{:,}\x02 followers. The users description is \"{}\" " \
|
if user.location:
|
||||||
"".format(prefix, user.screen_name, user.name, user.location, user.statuses_count, user.followers_count,
|
loc_str = " is located in \x02{}\x02 and".format(user.location)
|
||||||
user.description)
|
else:
|
||||||
|
loc_str = ""
|
||||||
|
|
||||||
|
if user.description:
|
||||||
|
desc_str = " The users description is \"{}\"".format(user.description)
|
||||||
|
else:
|
||||||
|
desc_str = ""
|
||||||
|
|
||||||
|
return u"{}@\x02{}\x02 ({}){} has \x02{:,}\x02 tweets and \x02{:,}\x02 followers.{}" \
|
||||||
|
"".format(prefix, user.screen_name, user.name, loc_str, user.statuses_count, user.followers_count,
|
||||||
|
desc_str)
|
||||||
|
|
Reference in a new issue