Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def run_bot_2(r, comments_replied_to):
- print("Obtaining 250 comments...")
- for comment in r.subreddit('test').comments(limit=250):
- match = re.search("\[\[(.*?)\]\]", comment.body)
- if(match):
- if comment.id not in comments_replied_to:
- if comment.author != r.user.me():
- comment_reply = comment_message("Player Stats: \n\n", response(match.group(1), player_info))
- comment.reply(comment_reply)
- print("Replied to comment " + comment.id)
- comments_replied_to.append(comment.id)
- with open("comments_replied_to.text", "a") as f:
- f.write(comment.id + "\n")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement