Advertisement
Guest User

Untitled

a guest
May 31st, 2016
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.73 KB | None | 0 0
  1. def processTweet(tweet):
  2.     if str(tweet.user.screen_name).lower() != "aikoncwd":
  3.         print "El usuario %s ha intentado hablarme!" % tweet.user.screen_name
  4.         api.update_status("@%s Solo obedezco a mi amo @aikoncwd" % tweet.user.screen_name, in_reply_to_status_id=tweet.id)
  5.     else:
  6.         if "poweroff" in tweet.text:
  7.             print "Mi amo me ha pedido que me vaya a dormir :("
  8.             api.update_status("@aikoncwd Comando recibido... me voy a dormir!", in_reply_to_status_id=tweet.id)
  9.         elif "reboot" in tweet.text:
  10.             print "Mi amo me ha pedido que me reinicie"
  11.             api.update_status("@aikoncwd Comando recibido... me voy a reiniciar!", in_reply_to_status_id=tweet.id)
  12.         # More elif? wtf!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement