SHARE
TWEET

Untitled

a guest Nov 5th, 2018 128 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # bigwordbot
  2.  
  3. import praw
  4.  
  5. # create the objects from the imported modules
  6.  
  7. # reddit api login
  8. reddit = praw.Reddit(client_id='szquiEWkWHZF-w',
  9.                      client_secret='P4MEooSSngVCzlvAMBkdcIQMnU8',
  10.                      username='Floch_Forster',
  11.                      password='shmmmm2014',
  12.                      user_agent='floch')
  13.  
  14. Floch_Forster = 'client'
  15.  
  16.  
  17. # the subreddits you want your bot to live on
  18. subreddit = reddit.subreddit('fhexmpls11')
  19.  
  20. # phrase to activate the bot
  21. phrase = 'eren'
  22.  
  23. # look for phrase and reply appropriately
  24. for comment in subreddit.stream.comments():
  25.     if  comment.author.name != 'Floch_Forster' and phrase in comment.body :
  26.          reply ='>Eren \n\n**its** ***Sir*** **Eren Jaeger, you Marleyan swine!2**'
  27.          comment.reply(reply)
  28.          print('posted')
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top