From bf47fb7406bdaa6eb6608c0fea8a403379e37a15 Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Wed, 23 Sep 2020 00:38:46 +0300 Subject: [PATCH] Add 'none' option for mentionRole --- docs/configuration.md | 2 +- src/utils.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/configuration.md b/docs/configuration.md index 75495c0..8ac6cd1 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -198,7 +198,7 @@ Alias for [inboxServerId](#inboxServerId) #### mentionRole **Default:** `here` **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. Set to an empty value (`mentionRole=`) to disable these pings entirely. diff --git a/src/utils.js b/src/utils.js index 1d5f238..37be29a 100644 --- a/src/utils.js +++ b/src/utils.js @@ -271,7 +271,7 @@ function getInboxMentionAllowedMentions() { }; 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 allowedMentions.roles.push(role); }