From 22b3a8af49dc16bf5d8f9c3ce48b4770505ea33b Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Wed, 6 Jul 2022 20:28:04 +0200 Subject: remove array from add*(...) --- src/commands/config/config.ts | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'src/commands/config/config.ts') diff --git a/src/commands/config/config.ts b/src/commands/config/config.ts index 66e10b6..c562add 100644 --- a/src/commands/config/config.ts +++ b/src/commands/config/config.ts @@ -320,7 +320,7 @@ export default class ConfigCommand extends BushCommand { const desc = settingsArr.map((s) => `:wrench: **${guildSettingsObj[s].name}**`).join('\n'); settingsEmbed.setDescription(desc); - const selMenu = new ActionRowBuilder().addComponents([ + const selMenu = new ActionRowBuilder().addComponents( new SelectMenuBuilder() .addOptions( settingsArr.map((s) => @@ -334,7 +334,7 @@ export default class ConfigCommand extends BushCommand { .setMaxValues(1) .setMinValues(1) .setCustomId('command_settingsSel') - ]); + ); return { embeds: [settingsEmbed], components: [selMenu] }; } else { settingsEmbed.setTitle(guildSettingsObj[setting].name); @@ -367,9 +367,9 @@ export default class ConfigCommand extends BushCommand { : '[No Value Set]'; }; - const components = new ActionRowBuilder().addComponents([ + const components = new ActionRowBuilder().addComponents( new ButtonBuilder({ style: ButtonStyle.Primary, customId: 'command_settingsBack', label: 'Back' }) - ]); + ); settingsEmbed.setDescription( `${Formatters.italic(guildSettingsObj[setting].description)}\n\n**Type:** ${guildSettingsObj[setting].type}` ); @@ -379,12 +379,10 @@ export default class ConfigCommand extends BushCommand { message.util.isSlash ? snakeCase(setting) : setting } ${guildSettingsObj[setting].type.includes('-array') ? 'add/remove' : 'set'} " to set this setting.` }); - settingsEmbed.addFields([ - { - name: 'value', - value: (await generateCurrentValue(guildSettingsObj[setting].type)) || '[No Value Set]' - } - ]); + settingsEmbed.addFields({ + name: 'value', + value: (await generateCurrentValue(guildSettingsObj[setting].type)) || '[No Value Set]' + }); return { embeds: [settingsEmbed], components: [components] }; } } -- cgit