Skip to content

Instantly share code, notes, and snippets.

@impshum
Created May 20, 2019 11:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save impshum/22d207d52e1f2f215d87179caecb34fe to your computer and use it in GitHub Desktop.
Save impshum/22d207d52e1f2f215d87179caecb34fe to your computer and use it in GitHub Desktop.
import praw
client_id = 'XXXX'
client_secret = 'XXXX'
reddit_user = 'XXXX'
reddit_pass = 'XXXX'
user_agent = 'Troll thing'
target_user = 'XXXX'
reply = 'Go spam someone else with your idiotic bullshit please.'
reddit = praw.Reddit(client_id=client_id,
client_secret=client_secret,
user_agent=user_agent,
username=reddit_user,
password=reddit_pass)
for msg in reddit.inbox.stream():
body = msg.body
author = msg.author.name
if author == target_user:
print(body)
msg.reply(reply)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment