Create a gist now

Instantly share code, notes, and snippets.

ShockedRarity bot
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 not in already_done and manspike in comment.body:
print, comment.body
comment.reply(' '.join([rarishock for _ in range(comment.body.count(manspike))]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment