# Path: reddit/redditconstants.py
# WAIT = 10
# 
# SUBREDDIT = "AnalyzeLast100Games+Dota2"
# 
# IGNOREAUTHORS = ["dotamatch", "AnalyzeLast100Games", "Lumbditest"]
# 
# KEYWORDS = ["dotabuff.com/players/", "yasp.co/players/", "opendota.com/players/", "dotabuff.com/matches/", "yasp.co/matches/", "opendota.com/matches/"]
# 
# MAXPOSTS = 100
# 
# CLEANCYCLES = 10
# 
# Path: reddit/workeranalyzecontent.py
# def analyzeContent(post, isPost):
# def RepresentsInt(s):
# 
# Path: reddit/botinfo.py



import time
import sqlite3
import threading
from reddit.redditconstants import WAIT, SUBREDDIT, IGNOREAUTHORS, KEYWORDS, MAXPOSTS, CLEANCYCLES
from reddit import workeranalyzecontent
from reddit.botinfo import message

                try:
                    pauthor = post.author.name
                except AttributeError:
                    if message2: print('[workerfindcomments] author is deleted, don\' care about this post')
                    continue



                if pauthor.lower() == r.user.me():
                    # Don't reply to yourself, robot!
                    if message2: print('[workerfindcomments] will not reply to myself')
                    continue

                if IGNOREAUTHORS != [] and any(auth2.lower() == pauthor.lower() for auth2 in IGNOREAUTHORS):
                    # This post was made by a ignoreauthor
                    if message2: print('[workerfindcomments] Post made by ignore author: ' + pauthor.lower())
                    continue


                cur.execute('SELECT * FROM oldposts WHERE ID=?', [pid])
                if cur.fetchone():
                    if message2: print('[workerfindcomments] already replied to comment')
                    continue

                cur.execute('INSERT INTO oldposts VALUES(?)', [pid])
                sql.commit()


                pbody = post.body.lower()

# Path: reddit/redditconstants.py
# WAIT = 10
# 
# SUBREDDIT = "AnalyzeLast100Games+Dota2"
# 
# IGNOREAUTHORS = ["dotamatch", "AnalyzeLast100Games", "Lumbditest"]
# 
# KEYWORDS = ["dotabuff.com/players/", "yasp.co/players/", "opendota.com/players/", "dotabuff.com/matches/", "yasp.co/matches/", "opendota.com/matches/"]
# 
# MAXPOSTS = 100
# 
# CLEANCYCLES = 10
# 
# Path: reddit/workeranalyzecontent.py
# def analyzeContent(post, isPost):
# def RepresentsInt(s):
# 
# Path: reddit/botinfo.py



# Path: reddit/workerfindcomments.py
import time
import sqlite3
import threading
from reddit.redditconstants import WAIT, SUBREDDIT, IGNOREAUTHORS, KEYWORDS, MAXPOSTS, CLEANCYCLES
from reddit import workeranalyzecontent
from reddit.botinfo import message


                try:
                    pauthor = post.author.name
                except AttributeError:
                    if message2: print('[workerfindcomments] author is deleted, don\' care about this post')
                    continue



                if pauthor.lower() == r.user.me():
                    # Don't reply to yourself, robot!
                    if message2: print('[workerfindcomments] will not reply to myself')
                    continue

                if IGNOREAUTHORS != [] and any(auth2.lower() == pauthor.lower() for auth2 in IGNOREAUTHORS):
                    # This post was made by a ignoreauthor
                    if message2: print('[workerfindcomments] Post made by ignore author: ' + pauthor.lower())
                    continue


                cur.execute('SELECT * FROM oldposts WHERE ID=?', [pid])
                if cur.fetchone():
                    if message2: print('[workerfindcomments] already replied to comment')
                    continue

                cur.execute('INSERT INTO oldposts VALUES(?)', [pid])
                sql.commit()


                pbody = post.body.lower()

                if any(key.lower() in pbody for key in KEYWORDS):