diff --git a/src/utils/confirmationMessage.ts b/src/utils/confirmationMessage.ts
index c805395..18e6ea0 100644
--- a/src/utils/confirmationMessage.ts
+++ b/src/utils/confirmationMessage.ts
@@ -2,11 +2,12 @@
     CommandInteraction,
     Interaction,
     Message,
-    MessageActionRow,
-    MessageButton,
+    ActionRowBuilder,
+    ButtonBuilder,
     MessageComponentInteraction,
     ModalSubmitInteraction,
-    TextInputComponent
+    TextInputComponent,
+    ButtonStyle
 } from "discord.js";
 import { modalInteractionCollector } from "./dualCollector.js";
 import EmojiEmbed from "./generateEmojiEmbed.js";
@@ -97,38 +98,38 @@
 
         while (!cancelled && success === undefined && !returnComponents && !newReason) {
             const fullComponents = [
-                new Discord.MessageButton()
+                new Discord.ButtonBuilder()
                     .setCustomId("yes")
                     .setLabel("Confirm")
-                    .setStyle(this.inverted ? "SUCCESS" : "DANGER")
+                    .setStyle(this.inverted ? ButtonStyle.Success : ButtonStyle.Danger)
                     .setEmoji(getEmojiByName("CONTROL.TICK", "id")),
-                new Discord.MessageButton()
+                new Discord.ButtonBuilder()
                     .setCustomId("no")
                     .setLabel("Cancel")
-                    .setStyle("SECONDARY")
+                    .setStyle(ButtonStyle.Secondary)
                     .setEmoji(getEmojiByName("CONTROL.CROSS", "id"))
             ];
             Object.entries(this.customButtons).forEach(([k, v]) => {
-                const button = new Discord.MessageButton()
+                const button = new Discord.ButtonBuilder()
                     .setCustomId(k)
                     .setLabel(v.title)
-                    .setStyle(v.active ? "SUCCESS" : "PRIMARY")
+                    .setStyle(v.active ? ButtonStyle.Success : ButtonStyle.Primary)
                     .setDisabled(v.disabled);
                 if (v.emoji !== undefined) button.setEmoji(getEmojiByName(v.emoji, "id"));
                 fullComponents.push(button);
             });
             if (this.reason !== null)
                 fullComponents.push(
-                    new Discord.MessageButton()
+                    new Discord.ButtonBuilder()
                         .setCustomId("reason")
                         .setLabel("Edit Reason")
-                        .setStyle("PRIMARY")
+                        .setStyle(ButtonStyle.Primary)
                         .setEmoji(getEmojiByName("ICONS.EDIT", "id"))
                         .setDisabled(false)
                 );
             const components = [];
             for (let i = 0; i < fullComponents.length; i += 5) {
-                components.push(new MessageActionRow().addComponents(fullComponents.slice(i, i + 5)));
+                components.push(new ActionRowBuilder().addComponents(fullComponents.slice(i, i + 5)));
             }
             const object = {
                 embeds: [
@@ -197,7 +198,7 @@
                         .setCustomId("modal")
                         .setTitle("Editing reason")
                         .addComponents(
-                            new MessageActionRow<TextInputComponent>().addComponents(
+                            new ActionRowBuilder<TextInputComponent>().addComponents(
                                 new TextInputComponent()
                                     .setCustomId("reason")
                                     .setLabel("Reason")
@@ -218,11 +219,11 @@
                             .setEmoji(this.emoji)
                     ],
                     components: [
-                        new MessageActionRow().addComponents([
-                            new MessageButton()
+                        new ActionRowBuilder().addComponents([
+                            new ButtonBuilder()
                                 .setLabel("Back")
                                 .setEmoji(getEmojiByName("CONTROL.LEFT", "id"))
-                                .setStyle("PRIMARY")
+                                .setStyle(ButtonStyle.Primary)
                                 .setCustomId("back")
                         ])
                     ]
diff --git a/src/utils/generateEmojiEmbed.ts b/src/utils/generateEmojiEmbed.ts
index 69058ae..a7926df 100644
--- a/src/utils/generateEmojiEmbed.ts
+++ b/src/utils/generateEmojiEmbed.ts
@@ -1,4 +1,4 @@
-import { MessageEmbed } from "discord.js";
+import { EmbedBuilder } from "discord.js";
 import getEmojiByName from "./getEmojiByName.js";
 
 const colors = {
@@ -7,7 +7,7 @@
     Success: 0x68d49e
 };
 
-class EmojiEmbed extends MessageEmbed {
+class EmojiEmbed extends EmbedBuilder {
     _title = "";
     _emoji: string | null = null;
 
@@ -18,10 +18,6 @@
         return `${getEmojiByName(this._emoji)} ${this._title}`;
     }
 
-    override set title(title: string) {
-        this._title = title;
-    }
-
     override setTitle(title: string) {
         this._title = title;
         return this;
diff --git a/src/utils/log.ts b/src/utils/log.ts
index d831a4b..e4ac4cd 100644
--- a/src/utils/log.ts
+++ b/src/utils/log.ts
@@ -75,7 +75,7 @@
             });
             if (channel) {
                 log.separate = log.separate || {};
-                const embed = new Discord.MessageEmbed()
+                const embed = new Discord.EmbedBuilder()
                     .setTitle(`${getEmojiByName(log.meta.emoji)} ${log.meta.displayName}`)
                     .setDescription(
                         (log.separate.start ? log.separate.start + "\n" : "") +
