This commit is contained in:
Imonlytryingtohelp
2026-04-04 15:52:06 +01:00
parent 476eadd6c9
commit dc8060270b
2 changed files with 12 additions and 1 deletions
+5 -1
View File
@@ -3,7 +3,7 @@ import praw
from config import get_reddit, Config
from update_checker import start_update_checker
BOT_VERSION = "2.2.2" # Change this for new releases
BOT_VERSION = "2.2.3" # Change this for new releases
BOT_NAME = "ModReplyBot" # Change this if bot name changes
import time
@@ -49,6 +49,10 @@ class ModReplyBot:
time.sleep(30)
def comment_only(self, submission, comment_text, matched_tag=None):
try:
# Replace template variables
comment_text = comment_text.replace("{{author}}", submission.author.name if submission.author else "unknown")
comment_text = comment_text.replace("{author}", submission.author.name if submission.author else "unknown")
# Check required text and prepend message if needed
if matched_tag and matched_tag in self.tag_required_text:
comment_text = self.check_required_text_and_prepend_message(