V2.1.1
This commit is contained in:
@@ -1,4 +1,13 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## [2.1.1] - 2026-03-10
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- Prevented AttributeError in modqueue watcher and tag_post_watcher by checking for 'link_flair_text' only on Submission objects. This avoids errors when processing Comment objects.
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Updated logic in modqueue watcher and tag_post_watcher to safely handle both Submission and Comment objects.
|
||||||
|
|
||||||
## [2.1.0] - 2026-03-10
|
## [2.1.0] - 2026-03-10
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
@@ -15,6 +24,8 @@
|
|||||||
- Added modqueue_watcher thread for independent modqueue processing.
|
- Added modqueue_watcher thread for independent modqueue processing.
|
||||||
- Added debug print statements for modqueue post attributes and loop entry.
|
- Added debug print statements for modqueue post attributes and loop entry.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
---
|
---
|
||||||
## [V2 release]
|
## [V2 release]
|
||||||
|
|
||||||
|
|||||||
+6
-2
@@ -249,7 +249,7 @@ class ModReplyBot:
|
|||||||
try:
|
try:
|
||||||
# Check new submissions
|
# Check new submissions
|
||||||
for submission in self.subreddit.stream.submissions(skip_existing=True):
|
for submission in self.subreddit.stream.submissions(skip_existing=True):
|
||||||
flair = (submission.link_flair_text or '').strip().lower()
|
flair = (getattr(submission, 'link_flair_text', '') or '').strip().lower()
|
||||||
title = submission.title.strip()
|
title = submission.title.strip()
|
||||||
import re
|
import re
|
||||||
title_tags = re.findall(r'\[(.*?)\]', title)
|
title_tags = re.findall(r'\[(.*?)\]', title)
|
||||||
@@ -288,7 +288,11 @@ class ModReplyBot:
|
|||||||
modqueue_posts = list(self.subreddit.mod.modqueue(limit=100))
|
modqueue_posts = list(self.subreddit.mod.modqueue(limit=100))
|
||||||
print(f"[MODQUEUE DEBUG] Fetched {len(modqueue_posts)} posts from modqueue.")
|
print(f"[MODQUEUE DEBUG] Fetched {len(modqueue_posts)} posts from modqueue.")
|
||||||
for submission in modqueue_posts:
|
for submission in modqueue_posts:
|
||||||
flair = (submission.link_flair_text or '').strip().lower()
|
# Only access link_flair_text if it's a Submission
|
||||||
|
if hasattr(submission, 'link_flair_text'):
|
||||||
|
flair = (submission.link_flair_text or '').strip().lower()
|
||||||
|
else:
|
||||||
|
flair = ''
|
||||||
title = submission.title.strip()
|
title = submission.title.strip()
|
||||||
import re
|
import re
|
||||||
title_tags = re.findall(r'\[(.*?)\]', title)
|
title_tags = re.findall(r'\[(.*?)\]', title)
|
||||||
|
|||||||
Reference in New Issue
Block a user