Advertisement
Guest User

Keywordtipbot Original

a guest
May 23rd, 2014
282
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.79 KB | None | 0 0
  1. import linecache
  2. import praw
  3. import random
  4. import time
  5.  
  6. r = praw.Reddit(user_agent="This bot tips people Dogecoin if they guess the word of the day. Created by /u/PieMan2201")
  7. r.login('keywordtipbot', '****************')
  8. alreadydone = set()
  9. while True:
  10.         z = random.randrange(1,500)
  11.         keyword = linecache.getline('dictionary', z).split('\n')[0]
  12.         time.sleep(86400)
  13.         dogecoin = r.get_subreddit('dogecoin')
  14.         doge_comments = dogecoin.get_comments()
  15.         for x in doge_comments:
  16.                 if keyword in x.body.lower() and x.id not in alreadydone:
  17.                         x.reply('You got the word of the day!  +/u/dogetipbot 125 doge verify')
  18.                         alreadydone.add(x.id)
  19.                 else:
  20.                         alreadydone.add(x.id)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement