aboutsummaryrefslogtreecommitdiff
path: root/src/commands/config
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-05-24 18:29:57 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-05-24 18:29:57 -0400
commit9f5d9da2a37ecfec412b149ec7dc385ab7b6a98c (patch)
tree4b95a06ff6991207ab8b8e93f0bca26e24a97f80 /src/commands/config
parent6b8115ab1ec94d4330019fc7a93e094d9d64c48e (diff)
downloadtanzanite-9f5d9da2a37ecfec412b149ec7dc385ab7b6a98c.tar.gz
tanzanite-9f5d9da2a37ecfec412b149ec7dc385ab7b6a98c.tar.bz2
tanzanite-9f5d9da2a37ecfec412b149ec7dc385ab7b6a98c.zip
fix: breaking changes
Diffstat (limited to 'src/commands/config')
-rw-r--r--src/commands/config/config.ts20
-rw-r--r--src/commands/config/features.ts4
2 files changed, 13 insertions, 11 deletions
diff --git a/src/commands/config/config.ts b/src/commands/config/config.ts
index c1dd142..e203d12 100644
--- a/src/commands/config/config.ts
+++ b/src/commands/config/config.ts
@@ -316,10 +316,10 @@ 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) =>
+ settingsArr.map((s) =>
new UnsafeSelectMenuOptionBuilder()
.setLabel(guildSettingsObj[s].name)
.setValue(s)
@@ -330,7 +330,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);
@@ -363,9 +363,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}`
);
@@ -375,10 +375,12 @@ 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 5218bcf..2eee0fe 100644
--- a/src/commands/config/features.ts
+++ b/src/commands/config/features.ts
@@ -84,7 +84,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,
@@ -98,6 +98,6 @@ export default class FeaturesCommand extends BushCommand {
description: guildFeaturesObj[f].description
}))
})
- );
+ ]);
}
}