feat: add warning expiration and exclude moderated messages from context
Warning flag now auto-expires after a configurable duration (warning_expiration_minutes, default 30m). After expiry, the user must be re-warned before a mute can be issued. Messages that triggered moderation actions (warnings/mutes) are now excluded from the LLM context window in both buffered analysis and mention scans, preventing already-actioned content from influencing future scoring. Uses in-memory tracking plus bot reaction fallback for post-restart coverage. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
1
bot.py
1
bot.py
@@ -112,6 +112,7 @@ class BCSBot(commands.Bot):
|
||||
window_size=sentiment.get("rolling_window_size", 10),
|
||||
window_minutes=sentiment.get("rolling_window_minutes", 15),
|
||||
offense_reset_minutes=timeouts.get("offense_reset_minutes", 120),
|
||||
warning_expiration_minutes=timeouts.get("warning_expiration_minutes", 30),
|
||||
)
|
||||
|
||||
def get_mode_config(self) -> dict:
|
||||
|
||||
Reference in New Issue
Block a user