diff options
Diffstat (limited to 'src/commands/config')
-rw-r--r-- | src/commands/config/config.ts | 1 | ||||
-rw-r--r-- | src/commands/config/features.ts | 27 |
2 files changed, 13 insertions, 15 deletions
diff --git a/src/commands/config/config.ts b/src/commands/config/config.ts index 7811663..00c6a69 100644 --- a/src/commands/config/config.ts +++ b/src/commands/config/config.ts @@ -101,7 +101,6 @@ export default class SettingsCommand extends BushCommand { }); } - // I make very readable code :) override *args(message: BushMessage): Generator<ArgumentOptions | Flag> { const optional = message.util.parsed!.alias === 'settings'; const setting = yield { diff --git a/src/commands/config/features.ts b/src/commands/config/features.ts index 7f9ffc9..8c9351d 100644 --- a/src/commands/config/features.ts +++ b/src/commands/config/features.ts @@ -74,21 +74,20 @@ export default class FeaturesCommand extends BushCommand { ); } - public generateComponents(guildFeatures: GuildFeatures[], disable: boolean): MessageActionRow { + public generateComponents(guildFeatures: GuildFeatures[], disable: boolean) { return new MessageActionRow().addComponents( - new MessageSelectMenu() - .addOptions( - ...guildFeatures.map((f) => ({ - label: guildFeaturesObj[f].name, - value: f, - description: guildFeaturesObj[f].description - })) - ) - .setPlaceholder('Select A Feature to Toggle') - .setMaxValues(1) - .setMinValues(1) - .setCustomId('command_selectFeature') - .setDisabled(disable) + new MessageSelectMenu({ + customId: 'command_selectFeature', + disabled: disable, + maxValues: 1, + minValues: 2, + options: guildFeatures.map((f) => ({ + label: guildFeaturesObj[f].name, + value: f, + description: guildFeaturesObj[f].description + })), + placeholder: 'Select A Feature to Toggle' + }) ); } } |