Lower mute thresholds and order warnings before chat replies
- spike_mute: 0.8→0.7, mute: 0.75→0.65 so escalating users get timed out after a warning instead of endlessly warned - Skip debounce on @mentions so sentiment analysis fires immediately - Chat cog awaits pending sentiment analysis before replying, ensuring warnings/mutes appear before the personality response Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -96,8 +96,12 @@ class SentimentCog(commands.Cog):
|
||||
if existing_task and not existing_task.done():
|
||||
existing_task.cancel()
|
||||
|
||||
# Start new debounce timer
|
||||
batch_window = config.get("sentiment", {}).get("batch_window_seconds", 3)
|
||||
# Skip debounce when bot is @mentioned so warnings fire before chat replies
|
||||
if self.bot.user in message.mentions:
|
||||
batch_window = 0
|
||||
else:
|
||||
batch_window = config.get("sentiment", {}).get("batch_window_seconds", 3)
|
||||
|
||||
self._debounce_tasks[key] = asyncio.create_task(
|
||||
self._debounce_then_process(key, batch_window)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user