Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import praw
- import config
- import time
- def bot_login():
- print ("Logging in.")
- r = praw.Reddit(username = config.username,
- password = config.password,
- client_id = config.client_id,
- client_secret = config.client_secret,
- user_agent = "Anti Suicide")
- print ("Logged in. Starting.")
- return r
- def run_bot(r):
- for comment in r.subreddit('spampeoplehere') .comments(limit=1000):
- if "$spam" in comment.body and not "$stop" in comment.body:
- comment.reply(comment.id)
- print ("Commented.")
- r = bot_login ()
- while True:
- run_bot (r)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement