Advertisement
Guest User

JerryThomas PM Reply

a guest
Apr 27th, 2017
232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.91 KB | None | 0 0
  1. import praw
  2.  
  3. r = praw.Reddit(client_id='xxxxxxxxxx',
  4.                      client_secret='xxxxxxxxxx',
  5.                      password='xxxxxxxxxx',
  6.                      user_agent='Jerry Thomas PM Replier 0.1 by /u/cwinthrop',
  7.                      username='JeremiahPThomas')
  8.  
  9. for pm in r.inbox.unread():
  10.     frm = pm.author
  11.     sub = pm.subject
  12.  
  13.     print(frm)
  14.     print(sub)
  15.  
  16.     repsub = 'Re: ' + sub
  17.     msg = "Hi there, {author}!\n\n I can't begin to tell you how wonderful it was to receive a message from you!\n\nSadly, I am just a simple robot with a button for a brain, and was unable to read your message.\n\nBut it was still wonderful of you to send it, and for that I am very grateful.\n\nYour friend,\n\nJerry Thomas (deceased)\n\nP.S. If you have a question or concern about my operation, I would suggest contacting /u/CWinthrop as he maintains me."
  18.     r.redditor("frm").message.reply("repsub", "msg")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement