My Automatic Response To Mentions Bot [code]

meya-smart-bot-1100x557.jpg

A simple little bot I created that will respond to any mention within comments or posts. I currently use it to respond to users who mention me @blueorgy and lets them know I'm listening ;) but it does not have to be limited to that. If you had an initiative or project that you wanted to make sure you respond to every comment or just be aware for example.

This is just the first version of the bot, I have some more tweaks I need to make for it to handle different situations, but overall its been working nicely for me.

Here's the code...

from piston.steem import Steem
steem = Steem(wif = 'XXXXXX')
mentions = ['']  #username or whatever you want for multiple use 'xxx','xxx'
commentedPermlinks = []
for p in steem.stream_comments():
   for mention in mentions:
      try:
         if mention in p['body'] and p['permlink'] not in commentedPermlinks and p['author'] != 'XXUSERNAMEXX':
             p.reply('Hi @'+p['author']+', I see you have mentioned me.
*This is automatic bot response so that I may respond to your mention later.*', title='', author='XXUSERNAMEXX') commentedPermlinks.append(p["permlink"]) print('Mentioned at:'+p["permlink"]+' by '+p["author"]+' & Responded.') except: print('error')

I will be creating some more "Helpful" friendly bots in the near future, so stay tuned.



Remember To Vote blueorgy for witness!
https://steemit.com/~witnesses

H2
H3
H4
3 columns
2 columns
1 column
54 Comments