diff --git a/src/reflex/guide.ts b/src/reflex/guide.ts
index 4e7703c..842951c 100644
--- a/src/reflex/guide.ts
+++ b/src/reflex/guide.ts
@@ -1,30 +1,31 @@
 import { LoadingEmbed } from "./../utils/defaultEmbeds.js";
 import Discord, {
-    MessageActionRow,
-    MessageButton,
+    ActionRowBuilder,
+    ButtonBuilder,
     MessageComponentInteraction,
     MessageSelectOptionData,
     Guild,
     CommandInteraction,
     GuildTextBasedChannel,
     Message,
-    SelectMenuInteraction
+    SelectMenuInteraction,
+    ButtonStyle
 } from "discord.js";
 import EmojiEmbed from "../utils/generateEmojiEmbed.js";
 import getEmojiByName from "../utils/getEmojiByName.js";
 import createPageIndicator from "../utils/createPageIndicator.js";
 
 class Embed {
-    embed: Discord.MessageEmbed;
+    embed: Discord.EmbedBuilder;
     title: string;
     description = "";
     pageId = 0;
 
     constructor() {
-        this.embed = new Discord.MessageEmbed();
+        this.embed = new Discord.EmbedBuilder();
         this.title = "";
     }
-    setEmbed(embed: Discord.MessageEmbed) {
+    setEmbed(embed: Discord.EmbedBuilder) {
         this.embed = embed;
         return this;
     }
@@ -233,7 +234,7 @@
     let cancelled = false;
     let timedOut = false;
     while (!cancelled && !timedOut) {
-        let selectPane: MessageActionRow[] = [];
+        let selectPane: ActionRowBuilder[] = [];
 
         if (selectPaneOpen) {
             const options: MessageSelectOptionData[] = [];
@@ -245,8 +246,8 @@
                 });
             });
             selectPane = [
-                new MessageActionRow().addComponents([
-                    new Discord.MessageSelectMenu()
+                new ActionRowBuilder().addComponents([
+                    new Discord.SelectMenuBuilder()
                         .addOptions(options)
                         .setCustomId("page")
                         .setMaxValues(1)
@@ -255,33 +256,33 @@
             ];
         }
         const components = selectPane.concat([
-            new MessageActionRow().addComponents([
-                new MessageButton()
+            new ActionRowBuilder().addComponents([
+                new ButtonBuilder()
                     .setCustomId("left")
                     .setEmoji(getEmojiByName("CONTROL.LEFT", "id"))
-                    .setStyle("SECONDARY")
+                    .setStyle(ButtonStyle.Secondary)
                     .setDisabled(page === 0),
-                new MessageButton()
+                new ButtonBuilder()
                     .setCustomId("select")
                     .setEmoji(getEmojiByName("CONTROL.MENU", "id"))
-                    .setStyle(selectPaneOpen ? "PRIMARY" : "SECONDARY")
+                    .setStyle(selectPaneOpen ? ButtonStyle.Primary : ButtonStyle.Secondary)
                     .setDisabled(false),
-                new MessageButton()
+                new ButtonBuilder()
                     .setCustomId("right")
                     .setEmoji(getEmojiByName("CONTROL.RIGHT", "id"))
-                    .setStyle("SECONDARY")
+                    .setStyle(ButtonStyle.Secondary)
                     .setDisabled(page === pages.length - 1)
             ])
         ]);
         if (interaction) {
-            const em = new Discord.MessageEmbed(pages[page]!.embed);
+            const em = new Discord.EmbedBuilder(pages[page]!.embed);
             em.setDescription(em.description + "\n\n" + createPageIndicator(pages.length, page));
             await interaction.editReply({
                 embeds: [em],
                 components: components
             });
         } else {
-            const em = new Discord.MessageEmbed(pages[page]!.embed);
+            const em = new Discord.EmbedBuilder(pages[page]!.embed);
             em.setDescription(em.description + "\n\n" + createPageIndicator(pages.length, page));
             (await m.edit({
                 embeds: [em],
@@ -322,7 +323,7 @@
     }
     if (timedOut) {
         if (interaction) {
-            const em = new Discord.MessageEmbed(pages[page]!.embed);
+            const em = new Discord.EmbedBuilder(pages[page]!.embed);
             em.setDescription(em.description + "\n\n" + createPageIndicator(pages.length, page)).setFooter({
                 text: "Message timed out"
             });
@@ -331,7 +332,7 @@
                 components: []
             });
         } else {
-            const em = new Discord.MessageEmbed(pages[page]!.embed);
+            const em = new Discord.EmbedBuilder(pages[page]!.embed);
             em.setDescription(em.description + "\n\n" + createPageIndicator(pages.length, page)).setFooter({
                 text: "Message timed out"
             });
@@ -342,7 +343,7 @@
         }
     } else {
         if (interaction) {
-            const em = new Discord.MessageEmbed(pages[page]!.embed);
+            const em = new Discord.EmbedBuilder(pages[page]!.embed);
             em.setDescription(em.description + "\n\n" + createPageIndicator(pages.length, page));
             em.setFooter({ text: "Message closed" });
             interaction.editReply({
diff --git a/src/reflex/verify.ts b/src/reflex/verify.ts
index 8aba46d..bbb0992 100644
--- a/src/reflex/verify.ts
+++ b/src/reflex/verify.ts
@@ -5,7 +5,8 @@
     Interaction,
     MessageComponentInteraction,
     Permissions,
-    Role
+    Role,
+    ButtonStyle
 } from "discord.js";
 import EmojiEmbed from "../utils/generateEmojiEmbed.js";
 import fetch from "node-fetch";
@@ -94,14 +95,14 @@
                     .setEmoji("CONTROL.BLOCKCROSS")
             ],
             components: [
-                new Discord.MessageActionRow().addComponents([
-                    new Discord.MessageButton()
+                new Discord.ActionRowBuilder().addComponents([
+                    new Discord.ButtonBuilder()
                         .setLabel("Check webpage")
-                        .setStyle("LINK")
+                        .setStyle(ButtonStyle.Link)
                         .setURL(client.config.baseUrl),
-                    new Discord.MessageButton()
+                    new Discord.ButtonBuilder()
                         .setLabel("Support")
-                        .setStyle("LINK")
+                        .setStyle(ButtonStyle.Link)
                         .setURL("https://discord.gg/bPaNnxe")
                 ])
             ]
@@ -228,10 +229,10 @@
                 .setEmoji("MEMBER.JOIN")
         ],
         components: [
-            new Discord.MessageActionRow().addComponents([
-                new Discord.MessageButton()
+            new Discord.ActionRowBuilder().addComponents([
+                new Discord.ButtonBuilder()
                     .setLabel("Verify")
-                    .setStyle("LINK")
+                    .setStyle(ButtonStyle.Link)
                     .setURL(`${client.config.baseUrl}nucleus/verify?code=${code}`)
             ])
         ]
