fixed distinguish comment
This commit is contained in:
@@ -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")
|
||||||
|
|||||||
Reference in New Issue
Block a user