Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def roundto5(x, base=5):
- return int(base * round(float(x)/base))
- import praw
- reddit=praw.Reddit(client_id='[insert client_id here]',
- client_secret='[insert secret key here]',
- username='[insert username here]',
- password='[insert password here]',
- user_agent='circleoftrustbot')
- subreddit=reddit.subreddit("circleoftrust")
- rising=subreddit.rising(limit=100)
- contacted=[]
- for submission in rising:
- flair_text=submission.author_flair_text
- number=flair_text.split(",")[1][1:-1]
- if number.isnumeric()==True:
- number=int(number)
- print(number)
- if number>5:
- advertisment=roundto5(number)
- subject='High volume circle trading'
- message="Hey! I see you like collecting circles and have a good rep - so do I. I currently am in 40 circles and I'm looking to grow. Want to trade "+str(advertisment)+" circle keys? I can go first if you like. If you have any questions feel free to PM me, I've done this kind of thing before."
- user=submission.author
- if user not in contacted:
- user.message(subject,message)
- contacted.append(user)
- else:
- subject='Key for key?'
- message="Hey! I'm in 40 circles and looking to expand. Want to trade keys? I'll give you one and you can give me yours. You can check how trustworthy I am by looking at my comment history and checking out my flair, the 40 next to my name means I'm in 40 circles"
- user=submission.author
- if user not in contacted:
- user.message(subject,message)
- contacted.append(user)
Advertisement
Add Comment
Please, Sign In to add comment