aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFuwn <[email protected]>2025-09-16 17:23:41 -0700
committerFuwn <[email protected]>2025-09-16 17:23:41 -0700
commit7fdcf7cc608deec3ddf82067e15fd236f04d3e5c (patch)
treeb308325733d79a14509e3c9845c21fa090d5e328
parentfeat(roleplay_limiter): Lower surge thresholds (diff)
downloadumabot-7fdcf7cc608deec3ddf82067e15fd236f04d3e5c.tar.xz
umabot-7fdcf7cc608deec3ddf82067e15fd236f04d3e5c.zip
feat(roleplay_limiter): Add minimum post allowance
-rw-r--r--src/umabot/rules/roleplay_limiter.py13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/umabot/rules/roleplay_limiter.py b/src/umabot/rules/roleplay_limiter.py
index 0226842..c63b1f7 100644
--- a/src/umabot/rules/roleplay_limiter.py
+++ b/src/umabot/rules/roleplay_limiter.py
@@ -23,7 +23,7 @@ class RoleplayLimiter(Rule):
self.surge_thresholds = [
(config.roleplay_surge_threshold_1, 2), # First threshold = 2 posts per user
(config.roleplay_surge_threshold_2, 1), # Second threshold = 1 post per user
- (config.roleplay_surge_threshold_3, 0), # Third threshold = 0 posts per user (block all)
+ (config.roleplay_surge_threshold_3, 1), # Third threshold = 1 post per user (minimum guaranteed)
]
def should_remove(self, submission: praw.models.Submission) -> bool:
@@ -87,13 +87,10 @@ class RoleplayLimiter(Rule):
f"({surge_level} roleplay posts in the last {self.config.roleplay_limit_window_hours} hours), "
)
- if user_limit == 0:
- main_message = f"roleplay posts are temporarily restricted in r/{self.config.subreddit_name}. "
- else:
- main_message = (
- f"users in r/{self.config.subreddit_name} can submit {user_limit} roleplay post(s) "
- f"within a {self.config.roleplay_limit_window_hours}-hour time window. "
- )
+ main_message = (
+ f"users in r/{self.config.subreddit_name} can submit {user_limit} roleplay post(s) "
+ f"within a {self.config.roleplay_limit_window_hours}-hour time window. "
+ )
notice = f"\n\nThis subreddit uses a surge-based system that dynamically adjusts limits based on overall activity. Your limit resets in {time_str}."