feat(discord): add mention_only config for @-mention trigger (#529)

When mention_only is true, the bot only responds to messages that
@-mention the bot. Other messages in the guild are silently ignored.
Also strips the bot mention from content before processing.

Co-authored-by: Will Sarg <12886992+willsarg@users.noreply.github.com>
This commit is contained in:
Vernon Stinebaker 2026-02-17 21:01:27 +08:00 committed by GitHub
parent a2986db3d6
commit 5b5d9fe77f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 56 additions and 14 deletions

View file

@ -2586,6 +2586,7 @@ fn setup_channels() -> Result<ChannelsConfig> {
guild_id: if guild.is_empty() { None } else { Some(guild) },
allowed_users,
listen_to_bots: false,
mention_only: false,
});
}
2 => {