SHARE
TWEET

Untitled

a guest Dec 3rd, 2019 198 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import praw
  2.  
  3.  
  4.  
  5.  
  6.  
  7. #############################################################################################
  8. # This is an example message, you can edit it as you wish                                   #
  9. # just make sure the text of the message body is contained between three pairs of quotes.   #
  10. message_subject = "Re: Your bid on my post in r/signupsforpay"
  11. message_body = """
  12. Hi,
  13.  
  14. I noticed your bid on my post in r/signupsforpay.
  15.  
  16. Please respond when you have claimed your stock with your name and preferred payment method.
  17.  
  18. Thanks,
  19. unisonnn
  20. """
  21. #############################################################################################
  22.  
  23. reddit = praw.Reddit(
  24.  
  25. #############################################################################################
  26. #ENTER YOUR REDDIT USERNAME AND PASSWORD HERE                                               #
  27. #   no one can access this code but you so it is secure,                                    #
  28. #   it's just for being able to send messages from your account                             #
  29.     username="<username>",
  30.     password="<password>",
  31. #############################################################################################
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.     user_agent="bid-reply-bot by u/theccount",client_id="Lnk3mz42M_T7Hg",client_secret="XPG8clX4IQ7ytN2nJtUSBzuhr2Y")
  39.  
  40. #go through each comment posted to r/signupsforpay
  41. for comment in reddit.subreddit("signupsforpay").stream.comments():
  42.    
  43.  
  44.     #if the post it's on was made by me
  45.     if comment.submission.author == reddit.user.me():
  46.  
  47.         #if the comment contains '$bid', send the author of the commment a message
  48.         if '$bid' in comment.body:
  49.             comment.author.message(subject=message_subject,message=message_body)
  50.             print("message sent")
  51.         else:
  52.             print("was a comment on your post but did not contain 'bid'")
  53.        
  54.     else:
  55.         print("was not a comment on your post")
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top