diff --git a/CHANGELOG.md b/CHANGELOG.md index c49b3b8..91a7b2b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## [2.1.2] - 2026-03-10 + +### Fixed +- Prevented AttributeError in modqueue watcher by checking for the 'title' attribute before accessing it. This ensures safe handling of Comment objects that do not have a 'title'. + ## [2.1.1] - 2026-03-10 ### Fixed diff --git a/modreplybot.py b/modreplybot.py index 7c8fe6e..928e34e 100644 --- a/modreplybot.py +++ b/modreplybot.py @@ -293,7 +293,11 @@ class ModReplyBot: flair = (submission.link_flair_text or '').strip().lower() else: flair = '' - title = submission.title.strip() + # Only access title if it's a Submission + if hasattr(submission, 'title'): + title = submission.title.strip() + else: + title = '' import re title_tags = re.findall(r'\[(.*?)\]', title) title_tags_lower = [t.strip().lower() for t in title_tags]