fixed distinguish comment

This commit is contained in:
2026-02-22 22:47:33 +00:00
parent f4f9e36a35
commit 99f0586efc

View File

@@ -40,7 +40,11 @@ def main(reddit, posts: dict):
if getattr(config, 'distinguish_comment', False): if getattr(config, 'distinguish_comment', False):
try: try:
sticky = getattr(config, 'distinguish_sticky', False) sticky = getattr(config, 'distinguish_sticky', False)
comment.mod.distinguish(how="yes", sticky=sticky) 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: except Exception as e:
print(f"Could not distinguish comment: {e}") print(f"Could not distinguish comment: {e}")
print(f"Post {submission} has been flaired {config.flair_text} for {config.hours} hours, posted comment") print(f"Post {submission} has been flaired {config.flair_text} for {config.hours} hours, posted comment")