Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import praw
- #############################################################################################
- # This is an example message, you can edit it as you wish #
- # just make sure the text of the message body is contained between three pairs of quotes. #
- message_subject = "Re: Your bid on my post in r/signupsforpay"
- message_body = """
- Hi,
- I noticed your bid on my post in r/signupsforpay.
- Please respond when you have claimed your stock with your name and preferred payment method.
- Thanks,
- unisonnn
- """
- #############################################################################################
- reddit = praw.Reddit(
- #############################################################################################
- #ENTER YOUR REDDIT USERNAME AND PASSWORD HERE #
- # no one can access this code but you so it is secure, #
- # it's just for being able to send messages from your account #
- username="<username>",
- password="<password>",
- #############################################################################################
- user_agent="bid-reply-bot by u/theccount",client_id="Lnk3mz42M_T7Hg",client_secret="XPG8clX4IQ7ytN2nJtUSBzuhr2Y")
- #go through each comment posted to r/signupsforpay
- for comment in reddit.subreddit("signupsforpay").stream.comments():
- #if the post it's on was made by me
- if comment.submission.author == reddit.user.me():
- #if the comment contains '$bid', send the author of the commment a message
- if '$bid' in comment.body:
- comment.author.message(subject=message_subject,message=message_body)
- print("message sent")
- else:
- print("was a comment on your post but did not contain 'bid'")
- else:
- print("was not a comment on your post")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement