Commit 06f60f8
fix(discord): detect role mentions in addition to user mentions
Previously, only direct @user mentions were detected. When a user
@mentioned a role that the bot has, Discord puts it in MentionRoles
not Mentions, so the bot would ignore messages with role mentions.
Now checks both:
- Direct user mentions (m.Mentions)
- Role mentions where bot has that role (m.MentionRoles + GuildMember lookup)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>1 parent c0fadba commit 06f60f8
1 file changed
+18
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
257 | 257 | | |
258 | 258 | | |
259 | 259 | | |
260 | | - | |
| 260 | + | |
261 | 261 | | |
262 | 262 | | |
| 263 | + | |
263 | 264 | | |
264 | 265 | | |
265 | 266 | | |
266 | 267 | | |
267 | 268 | | |
268 | 269 | | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
269 | 286 | | |
270 | 287 | | |
271 | 288 | | |
| |||
0 commit comments