Advertisement
Guest User

cult_autoreply_bot.py

a guest
Oct 24th, 2017
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.76 KB | None | 0 0
  1. from piston import Steem
  2.  
  3. steem = Steem(wif="tu_posting_private_key")
  4. # Instancia de la red de steem
  5. # Le agregamos de parĂ¡metro nuestra Wif para poder postear  
  6. accountname = 'tu_cuenta_de_steemit'
  7. # Creamos una constante con nuestra cuenta de usuario
  8.  
  9. # Hacemos un ciclo for con el streaming de la red en la var comment
  10. for comment in steem.stream_comments():
  11.  # Hacemos algunos prints para visualizar que estamos obteniendo
  12.     print('Author: '+  comment.author)
  13.     print('permlink: '+ comment.permlink)
  14. #   print('title: '+ comment.body )
  15.     if "@%s" % accountname in comment["body"]:
  16. # En este if evaluaremos si en los datos en tiempo real de la red alguien menciona a nuestro usuario
  17. # se comente el mensaje que queramos
  18.         comment.reply("mensaje que quieras")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement