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:
parent
a2986db3d6
commit
5b5d9fe77f
6 changed files with 56 additions and 14 deletions
|
|
@ -620,6 +620,7 @@ pub async fn doctor_channels(config: Config) -> Result<()> {
|
|||
dc.guild_id.clone(),
|
||||
dc.allowed_users.clone(),
|
||||
dc.listen_to_bots,
|
||||
dc.mention_only,
|
||||
)),
|
||||
));
|
||||
}
|
||||
|
|
@ -906,6 +907,7 @@ pub async fn start_channels(config: Config) -> Result<()> {
|
|||
dc.guild_id.clone(),
|
||||
dc.allowed_users.clone(),
|
||||
dc.listen_to_bots,
|
||||
dc.mention_only,
|
||||
)));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue