From fa42a21ac2dd171f6f3be87f0e24058727474cc5 Mon Sep 17 00:00:00 2001 From: Slfhstd Date: Sun, 22 Feb 2026 22:52:40 +0000 Subject: [PATCH] Distinguish all comments --- config/config.py | 3 --- flairtimercomment.py | 19 +++++++++---------- 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/config/config.py b/config/config.py index d800d67..bccb3ed 100644 --- a/config/config.py +++ b/config/config.py @@ -17,9 +17,6 @@ searchlimit = 600 # Max: 1000, this should only be limited to save on resources. # Comment message to post on old posts comment_message = "Hello OP! It has been at least __2 days__ since you last replied to your post. \n\n Please update your post in one of the following ways; \n\n * Reply to any relevant comments you haven't replied to yet. \n * [Mark your post solved](https://www.reddit.com/r/MinecraftHelp/wiki/rules/#wiki_7._points_sytem_rules), if your issue is fixed.\n\n \n __If you do not update your post within *7 days* you may receive a short ban.__ \n\n _Please note: Deleting this post, without marking it solved, is against [our rules](https://www.reddit.com/r/MinecraftHelp/wiki/rules/#wiki_7._points_sytem_rules)._ \n" -# Whether the bot should distinguish the posted comment (True/False) -distinguish_comment = True - # Whether the bot should lock the post after posting the comment (True/False) # Default is False to avoid accidental locking; set to True to enable locking. lock_post = False diff --git a/flairtimercomment.py b/flairtimercomment.py index 183b3ce..53fbb30 100644 --- a/flairtimercomment.py +++ b/flairtimercomment.py @@ -37,16 +37,15 @@ def main(reddit, posts: dict): print(f"Could not lock submission: {e}") comment = reddit.submission(submission).reply(body=config.comment_message) - if getattr(config, 'distinguish_comment', False): - try: - sticky = getattr(config, 'distinguish_sticky', False) - if sticky: - comment.mod.distinguish(how="yes", sticky=True) - else: - comment.mod.distinguish(how="yes") - print(f"Distinguished comment (sticky={sticky})") - except Exception as e: - print(f"Could not distinguish comment: {e}") + try: + sticky = getattr(config, 'distinguish_sticky', False) + if sticky: + comment.mod.distinguish(how="yes", sticky=True) + else: + comment.mod.distinguish(how="yes") + print(f"Distinguished comment (sticky={sticky})") + except Exception as e: + print(f"Could not distinguish comment: {e}") print(f"Post {submission} has been flaired {config.flair_text} for {config.hours} hours, posted comment") break