Advertisement
Guest User

shillbot.py

a guest
Apr 17th, 2019
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.25 KB | None | 0 0
  1. # Created by /u/real_aldous_huxley
  2. # Hours wasted on this 0.25
  3.  
  4. # Import Required libs
  5. import praw
  6. import re
  7. import random
  8.  
  9. # Define Reddit Instance
  10. def bot():
  11.     print("Logging in...")
  12.     # REPLACE THE TEXT IN QUOTATIONS WITH THE REDDIT ACCOUNTS RESPECTIVE CLIENT INFORMATION
  13. reddit = praw.Reddit(user_agent='USER_AGENT',
  14.                          client_id='CLIENT_ID',
  15.                          client_secret='CLIENT_SECRET',
  16.                          username='USERNAME',
  17.                          password='PASSWORD')
  18.  
  19.    
  20.  
  21. # Put quotes here in quotations seperated by commas they will be chosen randomly
  22. quotes = \
  23. [
  24. " You are speaking to a GP shill/troll I urge you to report them to the moderators. ^(This action was preformed automatically as part of my efforts to piss off GP shills) ",
  25.  
  26. ]
  27.  
  28.  
  29. # REPLACE TEST WITH THE SUBREDDIT YOU WANT THE BOT ACTIVE IN
  30. subreddit = reddit.subreddit("test")
  31. comments = subreddit.stream.comments()
  32.  
  33. for comment in comments:
  34.         text = comment.body
  35.         author = comment.author
  36.         message  = = random.choice(quotes)
  37.  
  38.         # REPLACE USER WITH THE USERNAME YOU WANT TO BOT TO STALK AND REPLY TO,
  39.         if str(comment.author) == 'user':
  40.  
  41.            
  42.  
  43.             comment.reply(message)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement