Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import praw
- reddit=praw.Reddit(client_id='the random string under your bot name',
- client_secret='the secret key',
- username='your username',
- password='your password',
- user_agent='how you called the bot')
- subreddit=reddit.subreddit("circleoftrust")
- rising=subreddit.rising(limit=2000)
- contacted=[]
- for submission in rising:
- number=submission.author_flair_text
- if number is not None:
- this=number.split(",")[1][1:-1]
- if this.isnumeric()==True:
- this=int(this)
- print(this)
- if this>1 and this<20:
- subject='key'
- message="can you pm me the key?"
- user=submission.author
- if user not in contacted:
- user.message(subject,message)
- contacted.append(user)
- print(user)
- elif this>20:
- subject='key'
- message="can you pm me the key?"
- user=submission.author
- if user not in contacted:
- user.message(subject,message)
- contacted.append(user)
- print(user)
- else:
- subject='key'
- message="can you pm me the key?"
- user=submission.author
- if user not in contacted:
- user.message(subject,message)
- contacted.append(user)
- print(user)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement