Recently someone was asking me for a copy of the script I use for the bot. Rather than just giving a copy to one user I've decided to give all Steem users a gift for xmas this year, I give you all an out of the box dickbutt bot (try saying that 3 times fast).
The bot is a rather crude script I made as an exercise in learning python and piston. You will need to have Python 3 and Steem-Piston installed to use it. The script can be used as a template if you want to create something that watches the stream of new posts & comments looking for a few criteria and then posting a random response from a list.
The main script is dickbutt.py. You will need to insert your own private posting key and account and username where it says PUTYOURKEYHERE and YOURUSERNAMEHERE. The script looks for a file in the same directory named dickbutts.txt. It will choose a random line from that file to be the comment that it posts as a reply.
dickbutt.py
from piston.steem import Steem
import os
import json
import traceback
import sys
import csv
import random
dickbutts = []
categories = ['test', 'funny', 'joke', 'adult', 'humor', 'humour', 'lol', 'nsfw']
with open('dickbutts.txt', mode='r') as infile:
reader = csv.reader(infile)
for rows in reader:
dickbutts.append(rows[0])
steem = Steem(wif="PUTYOURKEYHERE",node="wss://node.steem.ws")
for c in steem.stream_comments():
if bool(set(c["_tags"]) & set(categories)):
if "dickbutt" in c["body"].lower() and not "dickbutt" in c["author"]:
try:
response = c.reply(random.choice(dickbutts), title='', author='YOURUSERNAMEHERE')
print(response)
except:
traceback.print_exc()
dickbutts.txt
https://s17.postimg.io/rwalddxbz/flat_800x800_070_f_u2.jpg
https://s17.postimg.io/f66d0apdr/Dick_Buttpink.jpg
https://s17.postimg.io/kiv7efda7/dickbutt_mark_by_reilpikram_d8busm9.png
https://s17.postimg.io/gb50jf18f/l_VRUEc_A.png
https://s17.postimg.io/j6i3qa58f/dickbutt.jpg
https://s17.postimg.io/uk4n1hfr3/Hto_Ek_Gy.gif
https://s17.postimg.io/4eddyxzb3/dbspin.gif
https://s17.postimg.io/ozs5qugvz/WUGj_Yy_A.gif
https://s17.postimg.io/eqzol0su7/raw.gif
https://s17.postimg.io/oct91bjzz/dogedickbutt.gif
https://s17.postimg.io/uf0vrt8fz/dbupvote.gif
https://s17.postimg.io/u3jff1rzz/105441_dickbutt_rainbow_wiggle_gif_Im_6_YAW.gif
https://s17.postimg.io/otj21hx4v/DFDL8_E2.gif
https://s17.postimg.io/aod8zoo3j/dbgiphy.gif
https://s17.postimg.io/ojbji5iin/m5_En_TSs.jpg
https://s17.postimg.io/uyaketp8f/753_png.jpg
https://s17.postimg.io/8nmpeury7/flat_800x800_070_f_u1.jpg
https://media.giphy.com/media/lXiRoPY1WNZX1qxws/giphy.gif
http://p.fod4.com/p/media/092b2c9b9e/ClrRYRxqSrKuYsE73SMh_DIck%20Butt%20Simpsons.gif
https://media.giphy.com/media/dcd6WrsjIxpbq/giphy.gif
https://media.giphy.com/media/UOORDCKFofUju/giphy.gif
http://i3.kym-cdn.com/photos/images/list/001/129/877/db4.gif
http://i.imgur.com/FmFjQmw.gif
http://i.imgur.com/q9msmmg.gif
<img src="https://media.tenor.co/images/afa789d69a689427ee3cb0d184ad511f/raw">
http://i.imgur.com/1PQRIwO.gif
https://media.giphy.com/media/R8Dz80qD3D7KE/giphy.gif
https://media.giphy.com/media/EWtegVZUEizIs/giphy.gif
https://media.giphy.com/media/11K25sT17xCss8/giphy.gif
http://p.fod4.com/p/media/092b2c9b9e/yD2VVnymTpK3RLy7RsZX_Dick%20Butt%20Breaking%20Bad.gif
http://0.media.dorkly.cvcdn.com/32/88/4bc9b564dace7f2cea6b7bb4d14afd7e.gif
http://iruntheinternet.com/lulzdump/images/futurama-dick-butt-toast-bread-fry-1408962840n.gif?id=
Make sure to follow this profile