Reddit comment callback is not an edit instead of a new comment

This commit is contained in:
Simon
2018-08-08 22:41:25 -04:00
parent 458641654c
commit 89e378ffd9
2 changed files with 15 additions and 4 deletions

View File

@@ -52,12 +52,12 @@ class RedditCommentCallback(RedditCallback):
def run(self, task_result: TaskResult, search: SearchEngine):
comment_id = self.task.callback_args["comment_id"]
print("Replying to comment " + comment_id)
print("Editing comment comment " + comment_id)
stats = search.get_stats(self.task.website_id)
message = self.reddit_bot.get_comment(stats, self.task.website_id)
print(message)
self.reddit_bot.reply(self.reddit_bot.reddit.comment(comment_id), message)
self.reddit_bot.edit(self.reddit_bot.reddit.comment(comment_id), message)
class DiscordCallback(PostCrawlCallback):