Moved comment contents to config file.

This commit is contained in:
2026-02-22 20:10:56 +00:00
parent 68fc0c829f
commit 4157b8dbd0
2 changed files with 5 additions and 4 deletions

View File

@@ -12,6 +12,7 @@ interval = 30 # How often should the bot scan the subreddit for these posts, in
hours = 48 # How many hours must the flair been on the post to send the notification
messagetitle = "4 Day Old Post Notification" # Title of the modmail
searchlimit = 600 # Max: 1000, this should only be limited to save on resources. The bot sorts by new and if it isn't catching posts that are being changed to the flair simply because they are too old (say the 301st post on the subreddit is changed to the flair) then increase this limit.
searchlimit = 600 # Max: 1000, this should only be limited to save on resources. The bot sorts by new and if it isn't catching posts that are being changed to the flair simply because they are too old (say the 301st post on the subreddit is changed to the flair) then increase this limit.
# 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"

View File

@@ -29,7 +29,7 @@ def main(reddit, posts: dict):
if time.time() > posts[submission] + (config.hours * 60 * 60):
posts.pop(submission)
reddit.submission(submission).save()
reddit.submission(submission).reply(body="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").mod.distinguish(how="yes")
reddit.submission(submission).reply(body=config.comment_message).mod.distinguish(how="yes")
print(f"Post {submission} has been flaired {config.flair_text} for {config.hours} hours, posted comment")
break