Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [redditqtag]
- msg_title = Day {day_num}\'s Cursed Pearl!
- msg_template = **Day {day_num}, give it up for [day {day_num}!]({link})** ^(*Reply to be removed*)
- ; put the usernames in this list
- ; seperate each user with a ','. No spaces, no ','' at very end
- ; please don't leave my name in there 3 times. That's my example. lol.
- users = Techno_Wizard_,Techno_Wizard_,Techno_Wizard_
- [bot]
- scope=identity,livemanage,mysubreddits,privatemessages,read
- refreshable=True
- ; get these by logging onto reddit
- ; go to preferences -> apps tab
- ; scroll to bottom and "create another app"
- ; choose script, redirect is http://localhost:8080 (it actually means nothing)
- ; idk if the about url matters either. put anything in there that's a site
- ; the id isn't labeled as the id, but it's in the top left corner of the new app box
- ; that shows up and has a '-' in the middle of it.
- client_id=
- client_secret=
- ; your reddit username and password. Please. for the love of god,
- ; don't just share this file once you add them. lol.
- ; These don't go anywhere but reddit. I'm not some kind of monster.
- username=
- password=
- ; import praw
- ; import configparser
- ; import time
- ; try:
- ; config = configparser.ConfigParser()
- ; config.read("praw.ini")
- ; users_to_tag = config['redditqtag']['users']
- ; msg_template = config['redditqtag']['msg_template']
- ; msg_title = config['redditqtag']['msg_title']
- ; r = praw.Reddit(
- ; "bot", user_agent="py:redditqtag:1.0 (by /u/Techno_Wizard_)")
- ; except Exception as err:
- ; print('''==============================
- ; Something's wrong with praw.ini:\n''',
- str(err),
- ; '''===============================
- ; ''')
- ; raise SystemExit
- ; print('Users:', users_to_tag, '\n')
- ; link = str(input("Paste link to post\n-> "))
- ; day = str(input("What day number is it?\n-> "))
- ; msg_template = msg_template.format(link=link, day_num=day)
- ; msg_title = msg_title.format(link=link, day_num=day)
- ; print()
- ; print("Message preview")
- ; print('==========================')
- ; print(msg_title)
- ; print()
- ; print(msg_template)
- ; print('==========================')
- ; print('Begin sending to listed users . . .')
- ; for user in users_to_tag.split(','):
- ; print("\tNow sending to:", user)
- ; try:
- ; r.redditor(user).message(msg_title, msg_template)
- ; except Exception as err:
- ; print("\t\t!ERR failed")
- ; print(str(err))
- ; print('Done')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement