@hook.command('twuser', 'twinfo')
def twuser(text):
 if (tw_api is None):
  return
 try:
  user = tw_api.get_user(text)
 except tweepy.error.TweepError as e:
  if ('404' in e.reason):
   return 'Could not find user.'
  else:
   return 'Error: {}'.format(e.reason)
 if user.verified:
  prefix = '\\u2713'
 else:
  prefix = ''
 if user.location:
  loc_str = ' is located in \x02{}\x02 and'.format(user.location)
 else:
  loc_str = ''
 if user.description:
  desc_str = ' The users description is "{}"'.format(user.description)
 else:
  desc_str = ''
 return '{}@\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)

@ hook . command ( 'twuser' , 'twinfo' ) def twuser ( text ) : if ( tw_api is None ) : return try : user = tw_api . get_user ( text ) except tweepy . error . TweepError as e : if ( '404' in e . reason ) : return 'Could not find user.' else : return 'Error: {}' . format ( e . reason ) if user . verified : prefix = '\\u2713' else : prefix = '' if user . location : loc_str = ' is located in \x02{}\x02 and' . format ( user . location ) else : loc_str = '' if user . description : desc_str = ' The users description is "{}"' . format ( user . description ) else : desc_str = '' return '{}@\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 )
twuser <user> -- get info on the twitter user <user> .