From caf576a65738e1221e6bb1d544dc73d672e0c52e Mon Sep 17 00:00:00 2001 From: Navy Date: Tue, 1 Sep 2020 23:03:56 +0300 Subject: [PATCH] feedback for no resolved roles --- structure/client/components/settings/moderation/Protection.js | 1 + 1 file changed, 1 insertion(+) diff --git a/structure/client/components/settings/moderation/Protection.js b/structure/client/components/settings/moderation/Protection.js index c622e58..0e01d74 100644 --- a/structure/client/components/settings/moderation/Protection.js +++ b/structure/client/components/settings/moderation/Protection.js @@ -55,6 +55,7 @@ class ProtectionSetting extends Setting { const response = await resolver.resolveMethod(params, null, setting.roles, resolver.resolveRoles.bind(resolver), guild); if (!response) return { error: true, msg: message.format('ERR_INVALID_METHOD', { method }) }; ({ method } = response); + if (method !== 'list' && !response.resolved.length) return { error: true, msg: message.format('ERR_ROLERESOLVE') }; if (method === 'add') {