Files
cc-connect/platform
ahahahaandClaude Opus 4.6 e3902ccea8 fix(discord): support bot role mentions for @mention detection (#216)
Discord auto-creates a managed role for each bot. When a bot is not
visible in the channel member list (common in new channels or when
multiple bots share a guild), users can only @mention the role instead
of the user. The role mention format <@&roleID> was not recognized,
causing the bot to silently ignore the message.

Fix by:
- Caching bot's managed role ID on Ready and GuildCreate events
- Checking m.MentionRoles and <@&roleID> content in addition to
  m.Mentions and <@botID> content
- Stripping role mention tags from message content
- Adding IntentsGuilds to receive GuildCreate events for role lookup

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 12:01:59 +08:00
..