Guest User

Untitled

a guest
Jun 29th, 2020
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. import praw
  2. import requests
  3. ''' Variables '''
  4. PM_SUBJECT = 'SUBJECT'
  5. PM_MESSAGE = """ MESSAGE """
  6. USERAGENT = 'My Reddit Bot 942'
  7. ''' Code '''
  8. print('Logging in...')
  9. r = praw.Reddit(client_id='YOU MUST GENERATE THIS', client_secret='SAME HERE',user_agent='automates account function',username='YOURNAME',password='YOURPASSWORD')
  10. print(r.user.me())
  11. f = open("users.txt", "r")
  12. f1 = f.readlines
  13. for x in f1:
  14. print(x)
  15. try:
  16. r.redditor(x).message(PM_SUBJECT,PM_MESSAGE)
  17. except:
  18. print("Account Deleted?")
  19. print("MESSAGE SENT")
Add Comment
Please, Sign In to add comment