Add 'none' option for mentionRole

cshd
Dragory 2020-09-23 00:38:46 +03:00
parent 180f936bc4
commit bf47fb7406
No known key found for this signature in database
GPG Key ID: 5F387BA66DF8AAC1
2 changed files with 2 additions and 2 deletions

View File

@ -198,7 +198,7 @@ Alias for [inboxServerId](#inboxServerId)
#### mentionRole #### mentionRole
**Default:** `here` **Default:** `here`
**Accepts multiple values.** Role that is mentioned when new threads are created or the bot is mentioned. **Accepts multiple values.** Role that is mentioned when new threads are created or the bot is mentioned.
Accepted values are "here", "everyone", or a role id. Accepted values are `none`, `here`, `everyone`, or a role id.
Requires `pingOnBotMention` to be enabled. Requires `pingOnBotMention` to be enabled.
Set to an empty value (`mentionRole=`) to disable these pings entirely. Set to an empty value (`mentionRole=`) to disable these pings entirely.

View File

@ -271,7 +271,7 @@ function getInboxMentionAllowedMentions() {
}; };
for (const role of mentionRoles) { for (const role of mentionRoles) {
if (role == null) continue; if (role == null || role === "none") continue;
else if (role === "here" || role === "everyone") allowedMentions.everyone = true; else if (role === "here" || role === "everyone") allowedMentions.everyone = true;
else allowedMentions.roles.push(role); else allowedMentions.roles.push(role);
} }