Skip to content

fix: Discord @mention filter for group channels#320

Draft
deepmasq wants to merge 4 commits intomainfrom
fix/karen-discord-mention-filter
Draft

fix: Discord @mention filter for group channels#320
deepmasq wants to merge 4 commits intomainfrom
fix/karen-discord-mention-filter

Conversation

@deepmasq
Copy link
Copy Markdown
Contributor

Summary

  • In group Discord channels, only process messages where the bot is @mentioned
  • DMs are unaffected — all DMs still go through
  • Prevents bot flooding group channels and creating unnecessary tasks
  • Previously, only prompt-level "When NOT to Respond" existed, which still generated NOTHING_TO_SAY tokens

Test plan

  • Verify bot responds in DMs without @mention
  • Verify bot ignores group messages without @mention
  • Verify bot responds in group when @mentioned

🤖 Generated with Claude Code

DMs still go through. Group channel messages require bot @mention
at integration level — prevents flooding and unnecessary task creation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

if not isinstance(message.channel, discord.DMChannel):
if self.client.user not in message.mentions:
return
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good fix, but it should be in inbound_activity_to_task, in other means, it should be bot responsibility to decide, so it should be in the overridable function

Also after this we can call always ckit_kanban.bot_kanban_post_into_inprogress

no need to call ckit_kanban.bot_kanban_post_into_inbox if we don't respond to normal messages

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants