aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/umabot/rules/intelligent_moderator_base.py21
-rw-r--r--src/umabot/rules/intelligent_roleplay_moderator.py4
2 files changed, 5 insertions, 20 deletions
diff --git a/src/umabot/rules/intelligent_moderator_base.py b/src/umabot/rules/intelligent_moderator_base.py
index 39c00b0..2d04f14 100644
--- a/src/umabot/rules/intelligent_moderator_base.py
+++ b/src/umabot/rules/intelligent_moderator_base.py
@@ -189,23 +189,8 @@ Word Count: {word_count}
return True
# Check for gallery posts - these always have media
- try:
- if hasattr(submission, 'is_gallery') and submission.is_gallery:
- return True
- except AttributeError:
- pass
-
- # Check for image posts (not self posts)
- if not self._is_self(submission):
- url = self._get_url(submission)
- if url:
- url_lower = url.lower()
- # Check if it's a direct image link
- if any(ext in url_lower for ext in ['.jpg', '.jpeg', '.png', '.gif', '.webp']):
- return True
- # Check if it's from a known image hosting domain
- if any(domain in url_lower for domain in ['imgur.com', 'i.imgur.com', 'redd.it', 'i.redd.it']):
- return True
+ if self._is_gallery(submission):
+ return True
# Check for self posts with media links
if self._is_self(submission) and self._get_content(submission):
@@ -252,7 +237,7 @@ Word Count: {word_count}
try:
if self._is_video(submission):
return "video"
- elif hasattr(submission, 'is_gallery') and submission.is_gallery:
+ elif self._is_gallery(submission):
return "gallery"
else:
url = self._get_url(submission)
diff --git a/src/umabot/rules/intelligent_roleplay_moderator.py b/src/umabot/rules/intelligent_roleplay_moderator.py
index bd5a892..17298e0 100644
--- a/src/umabot/rules/intelligent_roleplay_moderator.py
+++ b/src/umabot/rules/intelligent_roleplay_moderator.py
@@ -122,7 +122,7 @@ class IntelligentRoleplayModerator(Rule, IntelligentModeratorBase):
self.subreddit.modmail.create(
subject=subject,
body=message,
- recipient=submission.author.name,
+ recipient=submission.author,
author_hidden=True
)
self.logger.info(f"Sent art flair change notification to {username}")
@@ -151,7 +151,7 @@ class IntelligentRoleplayModerator(Rule, IntelligentModeratorBase):
self.subreddit.modmail.create(
subject=subject,
body=message,
- recipient=submission.author.name,
+ recipient=submission.author,
author_hidden=True
)
self.logger.info(f"Sent low-effort removal notification to {username}")