Open ghost opened 7 years ago
Thanks for the useful info. Any chance you'd be willing to patch this?
Okay, I've had problems with running the source code, so I coppied what I could and wrote the rest. (Whole main is new) I've been working on it in python3, using my bot to test. As far as I can see it works.
I wasn't sure how the regex you had worked, so I wrote mine - feel free to throw it away as you wish.
Not entirely sure how to merge it with your source, so I put it in pastebin - https://pastebin.com/WLPijwu9
Make sure to put the proper praw.Reddit()
(I was simply using my 'bot1' to debug it) and test if it works on your version of python ;D
Reddit has propably changed the way it adds comment to the tree, so the way of checking if the comment has been replied by Marvin doesn't work anymore.
As far as I noticed, there's now a slight lag between clicking 'SAVE' and the comment actually being added to the comment tree by reddit's api. It's long enough for human to notice, so it's propably long enough to screw up bot.
You might want to keep a list of last 1000 or so replied to comment id's in memory and check if
comment.id in idlist
instead of checking if Marvin's nick is incomment.replies
.