Block stickied comments from being used

this blocks stickied comments from being used because this is mostly used for bot messages and not about the actual thread.
This commit is contained in:
PatatjeMC committed 2022-06-07 20:50:32 +02:00
1 parent 0a028358b2
commit f3d8af5a3a
1 file changed
+5 -4
+5 -4
View File
@@ -58,10 +58,11 @@ def get_subreddit_threads():
content["comments"] = []
for top_level_comment in submission.comments:
if len(top_level_comment.body) <= int(environ["MAX_COMMENT_LENGTH"]):
content["comments"].append(
{"comment_body": top_level_comment.body, "comment_url": top_level_comment.permalink,
"comment_id": top_level_comment.id, })
if not top_level_comment.stickied:
if len(top_level_comment.body) <= int(environ["MAX_COMMENT_LENGTH"]):
content["comments"].append(
{"comment_body": top_level_comment.body, "comment_url": top_level_comment.permalink,
"comment_id": top_level_comment.id, })
except AttributeError as e:
pass