feedback for no resolved roles

This commit is contained in:
Erik 2020-09-01 23:03:56 +03:00
parent 8d0b63a148
commit caf576a657

View File

@ -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') {