View difference between Paste ID: w37A4kAz and LRsXHCzu
SHOW: | | - or go back to the newest paste.
1
2
import time
3
4
from time import ctime
5
6
import praw
7
8
r = praw.Reddit('/r/cryptospread auto dogecoin tipper by u/PacnetNetty v 1.0.')
9
r.login("autodogetipper", "CENSORED")
10-
r.login("autodogetipper", "myguy22u")
10+
11
balance = 2000
12
13
while True:
14
    print('Checking subbredit again')
15
    subreddit = r.get_subreddit('cryptospread')
16
    for submission in subreddit.get_new(limit=10):
17
        alreadytipped = False     	
18
        if balance >= 100:
19
            flat_comments = praw.helpers.flatten_tree(submission.comments)
20
            for comment in flat_comments:
21
                print('Iterating through comment (author: ' + comment.author.name + ')')
22
                if comment.author.name == "autodogetipper":
23
                    print('already tipped')
24
                    alreadytipped = True
25
                    time.sleep(5)
26
            if not alreadytipped:                
27
                commentS = "You get 100 doge for free for posting in /r/cryptospread! +/u/dogetipbot 100 doge ........ \nOwner: /u/PacnetNetty | [info](http://www.reddit.com/r/cryptospread/comments/31jrr0/bot_autodogetipper_bot_is_now_active/) | Tip me to add to my pool!"
28
                
29
                submission.add_comment(commentS)
30
                
31
                balance = balance - 100
32
                print('[' + ctime() + '] Tipped ' + submission.id + ', waiting 11 more minutes (alreadytipped- ' + str(alreadytipped) + ')')
33
                time.sleep(660)
34
        else:
35
            r.send_message('PacnetNetty', 'Out of DOGE', 'I am out of doge, please refill me')
36-
            r.send_message('PacnetNetty', 'Out of DOGE', 'Im out of doge, please refill me')
36+
            print('OUT OF DOGE')
37-
            print('OUT OF DOGE')
37+
            time.sleep(600)