Guest User

Untitled

a guest
Jul 27th, 2018
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | None | 0 0
  1. import praw
  2. import praw.models
  3. import re
  4.  
  5. class ROBOT():
  6. def __init__(self):
  7.  
  8. ROBOT_boz = praw.Reddit(user_agent = "NOT_A_ROBOT_bot (v0.13 by u/xBroleh)",
  9. client_id = ",
  10. client_secret = "",
  11. username = "",
  12. password = "",
  13.  
  14. self.search(ROBOT_bot)
  15.  
  16. # Search
  17. for comments to process def search(self, bot):
  18. subreddit = bot.subreddit("all")
  19.  
  20. for comment in subreddit.stream.comments():
  21. if ("ɴᴏᴡ ᴘʟᴀʏɪɴɢ"
  22. not in comment.body.lower() and "play despacito" in comment.body.lower() and("sad" in comment.body.lower() or "alexa" in comment.body.lower())):
  23. try:
  24. n = re.search("despacito (\d+)", comment.body, re.IGNORECASE).group(1)
  25. except:
  26. n = ""
  27.  
  28. try:
  29. comment.reply("ɴᴏᴡ ᴘʟᴀʏɪɴɢ: Despacito " + n + "\n\n───────────────⚪────────────────────────────\n\n◄◄⠀▐▐ ⠀►►⠀⠀ ⠀ 1:17 / 3:48 ⠀ ───○ 🔊⠀ ᴴᴰ ⚙ ❐ ⊏⊐\n\n\n\n^I ^am ^a ^bot. ^I ^don't ^check ^my ^inbox. ^Please ^message ^[u\/Contramuffin](https://old.reddit.com/user/Contramuffin) ^for ^questions.") except:
  30. pass
  31.  
  32. ACTIVATE_BOT = ROBOT()
  33.  
  34. input("Enter to exit")
Add Comment
Please, Sign In to add comment