Advertisement
Guest User

Untitled

a guest
Nov 22nd, 2019
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.66 KB | None | 0 0
  1. def search():
  2.    
  3.     for submission in subreddit.new(limit=25):
  4.         if (submission.author == 'coloradoconvict'):        # this is one of my posts
  5.             print("Working one of my submissions...")
  6.             print(submission.title)
  7.             print(submission.created_utc)
  8.             for comment in submission.comments:
  9.                 if (comment.id not in comments_replied_to):     # we haven't answered this one
  10.                     found=comment.body.find('$bid')
  11.                     if (found != -1):               # this comment contains the keyword
  12.                         reddit.redditor(comment.author.name).message('Thanks for your bid!', BigAssMessage)
  13.                         comments_replied_to.append(comment.id)
  14.                         print("Message sent!")
  15.                         bids_processed += 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement