Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

ShockedRarity bot

View shocked_rarity.py
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
import praw
import time
 
manspike = '(/manspike)'
rarishock = '[](/rarishock)'
 
reddit = praw.Reddit('Responds to (/manspike) on /r/mylittlepony with (/rarishock) '
'by /u/jmgrosen/')
 
reddit.login('ShockedRarity', '********')
 
already_done = []
 
while True:
rmlp = reddit.get_subreddit('mylittlepony')
for comment in rmlp.get_comments():
if comment.id not in already_done and manspike in comment.body:
print comment.id, comment.body
comment.reply(' '.join([rarishock for _ in range(comment.body.count(manspike))]))
already_done.append(comment.id)
time.sleep(10)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.