Disable topic drift monitoring in general channel

Add ignored_channels config to topic_drift section, supporting
channel names or IDs. General channel excluded from off-topic
warnings while still receiving full moderation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-24 14:47:03 -05:00
parent b79d1897f9
commit dd0d18b0f5
2 changed files with 6 additions and 0 deletions

View File

@@ -430,6 +430,11 @@ class SentimentCog(commands.Cog):
if not config.get("enabled", True):
return
# Skip channels excluded from topic drift monitoring
ignored = config.get("ignored_channels", [])
if message.channel.id in ignored or getattr(message.channel, "name", "") in ignored:
return
# Check if we're in dry-run mode — still track but don't act
dry_run = self.bot.config.get("monitoring", {}).get("dry_run", False)
if dry_run:

View File

@@ -28,6 +28,7 @@ game_channels:
topic_drift:
enabled: true
ignored_channels: ["general"] # Channel names or IDs to skip topic drift monitoring
remind_cooldown_minutes: 10 # Don't remind same user more than once per this window
escalation_count: 3 # After this many reminds, DM the server owner
reset_minutes: 60 # Reset off-topic count after this much on-topic behavior