My Automatic Response To Mentions Bot [code]steemCreated with Sketch.

in #bot7 years ago (edited)

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

Sort:  

I wonder if we can create bots to automatically reply to followers/upvote beggars with some helpful tips and warnings about ruining their own reputation...

Good idea indeed. I concur.

thats actually a brilliant idea

Thank you very much! I'm not that good at executing it though, so I'll leave that for someone else to figure out ;-)

Not a bad idea ;)! Would be pretty easy too and you could auto down vote as well.

Wouldn't that be nice! I think we're not far off from bots like that becoming a reality. I find myself downvoting those comments more frequently aswell lately.

What if...I made a bot that auto responds to your comments with a mention of you?....

Don't do this. The universe will fold on itself...

Good luck @blueorgy. Add some AI and make it much more better soon.

Well we will see.

Hi @ur-nxt-grlfrnd, I see you have mentioned me.
This is automatic bot response so that I may respond to your mention later.
Learn more about this bot...

Nice fix until we get alerts for @ mentions.

@blueorgy very nice bot i really like and appreciate your efforts.

Will Steemit be the world of bots?

well I hope not. There is a time and a place for them, this one only comments when I'm mentioned and mostly for my benefit and to let the user know Ive seen it. If Steemit added a mentions tab then this would be unneeded.

@blueorgy I love your robot!! It just respond to my last post..course I give credit to it's programmer. :)

I need to start tagging you more so I can talk to your bot...lol. Seriously, think I need to start adding tags to all my loyal supporters in my posts.

Welcome to Botland =)

I already upvote you, i beg my upvote.
thank you

Wahh,, mantap bos

I love this bot. It's a friendly one. 🤗

Coin Marketplace

STEEM 0.20
TRX 0.13
JST 0.029
BTC 65560.09
ETH 3467.72
USDT 1.00
SBD 2.68