diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-07-06 20:28:04 +0200 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-07-06 20:28:04 +0200 |
commit | 22b3a8af49dc16bf5d8f9c3ce48b4770505ea33b (patch) | |
tree | ab7f68cb9168d2b06ba144b48311370059cf5fac /src/commands/config | |
parent | 544f94704c9dd37913de11eab67cd594d17fcd87 (diff) | |
download | tanzanite-22b3a8af49dc16bf5d8f9c3ce48b4770505ea33b.tar.gz tanzanite-22b3a8af49dc16bf5d8f9c3ce48b4770505ea33b.tar.bz2 tanzanite-22b3a8af49dc16bf5d8f9c3ce48b4770505ea33b.zip |
remove array from add*(...)
Diffstat (limited to 'src/commands/config')
-rw-r--r-- | src/commands/config/config.ts | 18 | ||||
-rw-r--r-- | src/commands/config/features.ts | 4 |
2 files changed, 10 insertions, 12 deletions
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<SelectMenuBuilder>().addComponents([ + const selMenu = new ActionRowBuilder<SelectMenuBuilder>().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<ButtonBuilder>().addComponents([ + const components = new ActionRowBuilder<ButtonBuilder>().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'} <value>" 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] }; } } diff --git a/src/commands/config/features.ts b/src/commands/config/features.ts index e119936..5eafb0c 100644 --- a/src/commands/config/features.ts +++ b/src/commands/config/features.ts @@ -86,7 +86,7 @@ export default class FeaturesCommand extends BushCommand { } public generateComponents(guildFeatures: GuildFeatures[], disable: boolean) { - return new ActionRowBuilder<SelectMenuBuilder>().addComponents([ + return new ActionRowBuilder<SelectMenuBuilder>().addComponents( new SelectMenuBuilder({ customId: 'command_selectFeature', disabled: disable, @@ -100,6 +100,6 @@ export default class FeaturesCommand extends BushCommand { description: guildFeaturesObj[f].description })) }) - ]); + ); } } |