moved to d.js 14.3.0, started fixing errors
Co-authored-by: PineappleFan <pineapplefanyt@gmail.com>
diff --git a/src/commands/settings/logs/staff.ts b/src/commands/settings/logs/staff.ts
index 023a13e..44b8d69 100644
--- a/src/commands/settings/logs/staff.ts
+++ b/src/commands/settings/logs/staff.ts
@@ -1,6 +1,6 @@
import { LoadingEmbed } from "./../../../utils/defaultEmbeds.js";
import { ChannelType } from "discord-api-types/v9";
-import Discord, { CommandInteraction, MessageActionRow, MessageButton } from "discord.js";
+import Discord, { CommandInteraction, ActionRowBuilder, ButtonBuilder, ButtonStyle } from "discord.js";
import EmojiEmbed from "../../../utils/generateEmojiEmbed.js";
import confirmationMessage from "../../../utils/confirmationMessage.js";
import getEmojiByName from "../../../utils/getEmojiByName.js";
@@ -134,12 +134,12 @@
.setEmoji("CHANNEL.TEXT.CREATE")
],
components: [
- new MessageActionRow().addComponents([
- new MessageButton()
+ new ActionRowBuilder().addComponents([
+ new ButtonBuilder()
.setCustomId("clear")
.setLabel(clicks ? "Click again to confirm" : "Reset channel")
.setEmoji(getEmojiByName(clicks ? "TICKETS.ISSUE" : "CONTROL.CROSS", "id"))
- .setStyle("DANGER")
+ .setStyle(ButtonStyle.Danger)
.setDisabled(!channel)
])
]
@@ -152,7 +152,7 @@
continue;
}
i.deferUpdate();
- if ((i.component as MessageButton).customId === "clear") {
+ if ((i.component as ButtonBuilder).customId === "clear") {
clicks += 1;
if (clicks === 2) {
clicks = 0;
@@ -175,12 +175,12 @@
.setFooter({ text: "Message closed" })
],
components: [
- new MessageActionRow().addComponents([
- new MessageButton()
+ new ActionRowBuilder().addComponents([
+ new ButtonBuilder()
.setCustomId("clear")
.setLabel("Clear")
.setEmoji(getEmojiByName("CONTROL.CROSS", "id"))
- .setStyle("SECONDARY")
+ .setStyle(ButtonStyle.Secondary)
.setDisabled(true)
])
]