Advertisement
Guest User

Untitled

a guest
Jan 26th, 2019
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.45 KB | None | 0 0
  1. [redditqtag]
  2. msg_title = Day {day_num}\'s Cursed Pearl!
  3. msg_template = **Day {day_num}, give it up for [day {day_num}!]({link})** ^(*Reply to be removed*)
  4.  
  5. ; put the usernames in this list
  6. ; seperate each user with a ','. No spaces, no ','' at very end
  7. ; please don't leave my name in there 3 times. That's my example. lol.
  8. users = Techno_Wizard_,Techno_Wizard_,Techno_Wizard_
  9.  
  10. [bot]
  11. scope=identity,livemanage,mysubreddits,privatemessages,read
  12. refreshable=True
  13. ; get these by logging onto reddit
  14. ; go to preferences -> apps tab
  15. ; scroll to bottom and "create another app"
  16. ; choose script, redirect is http://localhost:8080 (it actually means nothing)
  17. ; idk if the about url matters either. put anything in there that's a site
  18. ; the id isn't labeled as the id, but it's in the top left corner of the new app box
  19. ; that shows up and has a '-' in the middle of it.
  20. client_id=
  21. client_secret=
  22. ; your reddit username and password. Please. for the love of god,
  23. ; don't just share this file once you add them. lol.
  24. ; These don't go anywhere but reddit. I'm not some kind of monster.
  25. username=
  26. password=
  27.  
  28.  
  29. ; import praw
  30. ; import configparser
  31. ; import time
  32.  
  33. ; try:
  34. ; config = configparser.ConfigParser()
  35. ; config.read("praw.ini")
  36. ; users_to_tag = config['redditqtag']['users']
  37. ; msg_template = config['redditqtag']['msg_template']
  38. ; msg_title = config['redditqtag']['msg_title']
  39. ; r = praw.Reddit(
  40. ; "bot", user_agent="py:redditqtag:1.0 (by /u/Techno_Wizard_)")
  41. ; except Exception as err:
  42. ; print('''==============================
  43. ; Something's wrong with praw.ini:\n''',
  44. str(err),
  45. ; '''===============================
  46. ; ''')
  47. ; raise SystemExit
  48.  
  49.  
  50. ; print('Users:', users_to_tag, '\n')
  51. ; link = str(input("Paste link to post\n-> "))
  52. ; day = str(input("What day number is it?\n-> "))
  53. ; msg_template = msg_template.format(link=link, day_num=day)
  54. ; msg_title = msg_title.format(link=link, day_num=day)
  55.  
  56.  
  57. ; print()
  58. ; print("Message preview")
  59. ; print('==========================')
  60. ; print(msg_title)
  61. ; print()
  62. ; print(msg_template)
  63. ; print('==========================')
  64. ; print('Begin sending to listed users . . .')
  65. ; for user in users_to_tag.split(','):
  66. ; print("\tNow sending to:", user)
  67. ; try:
  68. ; r.redditor(user).message(msg_title, msg_template)
  69. ; except Exception as err:
  70. ; print("\t\t!ERR failed")
  71. ; print(str(err))
  72.  
  73. ; print('Done')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement