public
Created

ShockedRarity bot

  • Download Gist
shocked_rarity.py
Python
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)

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.