premium and exact matching
This commit is contained in:
parent
978f7eabd9
commit
4583302799
@ -68,7 +68,7 @@ class SettingsCommand extends Command {
|
||||
return await this._handleReset(prompt, message, type);
|
||||
}
|
||||
|
||||
const settings = this.client.resolver.components(target, 'setting', false).sort(c=>c.resolve === type);
|
||||
const settings = this.client.resolver.components(target, 'setting', true).sort(c=>c.resolve === type);
|
||||
const [ setting ] = settings;
|
||||
if(!setting) {
|
||||
await message.respond(message.format('C_SETTINGS_NONEXISTANT'), { emoji: 'failure' });
|
||||
@ -98,6 +98,8 @@ class SettingsCommand extends Command {
|
||||
return message.respond(msg, { emoji: 'success' });
|
||||
}
|
||||
|
||||
if (setting.premium > message.guild.premium) return message.formattedRespond('PREMIUM_REQUIRED', { emoji: 'failure', params: { tier: message.guild.premium, required: setting.premium } });
|
||||
|
||||
const response = await setting.handle(message, parameters);
|
||||
if(response.ignore) return undefined;
|
||||
message.respond(response.msg, { emoji: response.error ? 'failure' : 'success', embed: response.embed || null });
|
||||
|
Loading…
Reference in New Issue
Block a user