moved to d.js 14.3.0, started fixing errors
Co-authored-by: PineappleFan <pineapplefanyt@gmail.com>
diff --git a/src/commands/user/track.ts b/src/commands/user/track.ts
index 8c991e3..a8a837b 100644
--- a/src/commands/user/track.ts
+++ b/src/commands/user/track.ts
@@ -1,5 +1,5 @@
import { LoadingEmbed } from "./../../utils/defaultEmbeds.js";
-import Discord, { CommandInteraction, GuildMember, Message, MessageActionRow, MessageButton } from "discord.js";
+import Discord, { CommandInteraction, GuildMember, Message, ActionRowBuilder, ButtonBuilder, ButtonStyle } from "discord.js";
import { SelectMenuOption, SlashCommandSubcommandBuilder } from "@discordjs/builders";
// @ts-expect-error
import { WrappedCheck } from "jshaiku";
@@ -43,7 +43,7 @@
return memberRoles.cache.has(element);
});
else managed = false;
- const dropdown = new Discord.MessageSelectMenu()
+ const dropdown = new Discord.SelectMenuBuilder()
.addOptions(
config.tracks.map((option, index) => {
const hasRoleInTrack = option.track.some((element: string) => {
@@ -114,7 +114,7 @@
);
});
conflictDropdown = [
- new Discord.MessageSelectMenu()
+ new Discord.SelectMenuBuilder()
.addOptions(conflictDropdown)
.setCustomId("conflict")
.setMaxValues(1)
@@ -135,27 +135,27 @@
.setDescription(`${generated}`)
.setStatus("Success")
],
- components: [new MessageActionRow().addComponents(dropdown)]
+ components: [new ActionRowBuilder().addComponents(dropdown)]
.concat(
- conflict && conflictDropdown.length ? [new MessageActionRow().addComponents(conflictDropdown)] : []
+ conflict && conflictDropdown.length ? [new ActionRowBuilder().addComponents(conflictDropdown)] : []
)
.concat([
- new MessageActionRow().addComponents([
- new MessageButton()
+ new ActionRowBuilder().addComponents([
+ new ButtonBuilder()
.setEmoji(getEmojiByName("CONTROL.UP", "id"))
.setLabel("Move up")
.setCustomId("promote")
- .setStyle("SUCCESS")
+ .setStyle(ButtonStyle.Success)
.setDisabled(
conflict ||
currentRoleIndex === 0 ||
(currentRoleIndex === -1 ? false : !allowed[currentRoleIndex - 1])
),
- new MessageButton()
+ new ButtonBuilder()
.setEmoji(getEmojiByName("CONTROL.DOWN", "id"))
.setLabel("Move down")
.setCustomId("demote")
- .setStyle("DANGER")
+ .setStyle(ButtonStyle.Danger)
.setDisabled(
conflict ||
(data.nullable