2.2.3
This commit is contained in:
@@ -1,6 +1,13 @@
|
||||
|
||||
# Changelog
|
||||
|
||||
## [2.2.3] - 2026-04-04
|
||||
|
||||
### Fixed
|
||||
- **Template Variable Substitution in post_tags Comments:**
|
||||
- Fixed issue where `{author}` and `{{author}}` placeholders in `post_tags` comments were not being replaced with the actual post author's username.
|
||||
- Template variables now properly substitute in automatic post_tags comments, matching behavior of trigger-based comments.
|
||||
|
||||
## [2.2.2] - 2026-03-29
|
||||
|
||||
### Added
|
||||
|
||||
+5
-1
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user