aboutsummaryrefslogtreecommitdiff
path: root/src/commands/config/features.ts
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-04-20 18:37:22 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-04-20 18:37:22 -0400
commitf01be2e3ce820e5737416180efa3e5852ece72c4 (patch)
treea972af929940173e4e2d9f843124a8dfb293bc90 /src/commands/config/features.ts
parentbcb3dc5fcd21f7626d4c5a8c009dca5658a4436b (diff)
downloadtanzanite-f01be2e3ce820e5737416180efa3e5852ece72c4.tar.gz
tanzanite-f01be2e3ce820e5737416180efa3e5852ece72c4.tar.bz2
tanzanite-f01be2e3ce820e5737416180efa3e5852ece72c4.zip
fix invite link, remove store channel, update to use builder methods, fix breaking changes
Diffstat (limited to 'src/commands/config/features.ts')
-rw-r--r--src/commands/config/features.ts17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/commands/config/features.ts b/src/commands/config/features.ts
index c022a3a..5218bcf 100644
--- a/src/commands/config/features.ts
+++ b/src/commands/config/features.ts
@@ -8,11 +8,11 @@ import {
} from '#lib';
import assert from 'assert';
import {
- ActionRow,
+ ActionRowBuilder,
ComponentType,
- Embed,
+ EmbedBuilder,
PermissionFlagsBits,
- SelectMenuComponent,
+ SelectMenuBuilder,
type Message,
type SelectMenuInteraction
} from 'discord.js';
@@ -35,7 +35,7 @@ export default class FeaturesCommand extends BushCommand {
public override async exec(message: BushMessage | BushSlashMessage) {
assert(message.inGuild());
- const featureEmbed = new Embed().setTitle(`${message.guild.name}'s Features`).setColor(util.colors.default);
+ const featureEmbed = new EmbedBuilder().setTitle(`${message.guild.name}'s Features`).setColor(util.colors.default);
const enabledFeatures = await message.guild.getSetting('enabledFeatures');
this.generateDescription(guildFeaturesArr, enabledFeatures, featureEmbed);
@@ -62,7 +62,8 @@ export default class FeaturesCommand extends BushCommand {
await interaction.update({ embeds: [featureEmbed] }).catch(() => undefined);
return;
} else {
- return await interaction?.deferUpdate().catch(() => undefined);
+ await interaction?.deferUpdate().catch(() => undefined);
+ return;
}
});
@@ -71,7 +72,7 @@ export default class FeaturesCommand extends BushCommand {
});
}
- public generateDescription(allFeatures: GuildFeatures[], currentFeatures: GuildFeatures[], embed: Embed): void {
+ public generateDescription(allFeatures: GuildFeatures[], currentFeatures: GuildFeatures[], embed: EmbedBuilder): void {
embed.setDescription(
allFeatures
.map(
@@ -83,8 +84,8 @@ export default class FeaturesCommand extends BushCommand {
}
public generateComponents(guildFeatures: GuildFeatures[], disable: boolean) {
- return new ActionRow().addComponents(
- new SelectMenuComponent({
+ return new ActionRowBuilder<SelectMenuBuilder>().addComponents(
+ new SelectMenuBuilder({
customId: 'command_selectFeature',
disabled: disable,
maxValues: 1,