diff --git a/src/api/index.ts b/src/api/index.ts
index b6f82f8..d0df639 100644
--- a/src/api/index.ts
+++ b/src/api/index.ts
@@ -1,14 +1,17 @@
-import type { Client } from 'discord.js';
+import type { NucleusClient } from '../utils/client.js';
+//@ts-expect-error
 import express from "express";
+//@ts-expect-error
 import bodyParser from "body-parser";
 import EmojiEmbed from "../utils/generateEmojiEmbed.js";
+//@ts-expect-error
 import structuredClone from "@ungap/structured-clone";
 
 const jsonParser = bodyParser.json();
 const app = express();
 const port = 10000;
 
-const runServer = (client: Client) => {
+const runServer = (client: NucleusClient) => {
     app.get("/", (req, res) => {
         res.status(200).send(client.ws.ping);
     });
@@ -17,20 +20,20 @@
         const code = req.params.code;
         const secret = req.body.secret;
         if (secret === client.config.verifySecret) {
-            const guild = await client.guilds.fetch(client.verify[code].gID);
+            const guild = await client.guilds.fetch(client.verify[code]!.gID);
             if (!guild) {
                 return res.status(404);
             }
-            const member = await guild.members.fetch(client.verify[code].uID);
+            const member = await guild.members.fetch(client.verify[code]!.uID);
             if (!member) {
                 return res.status(404);
             }
-            if (member.roles.cache.has(client.verify[code].rID)) {
+            if (member.roles.cache.has(client.verify[code]!.rID)) {
                 return res.status(200);
             }
-            await member.roles.add(client.verify[code].rID);
+            await member.roles.add(client.verify[code]!.rID);
 
-            const interaction = client.verify[code].interaction;
+            const interaction = client.verify[code]!.interaction;
             if (interaction) {
                 interaction.editReply({
                     embeds: [
@@ -57,7 +60,7 @@
                     },
                     list: {
                         memberId: entry(member.id, `\`${member.id}\``),
-                        member: entry(member.id, renderUser(member))
+                        member: entry(member.id, renderUser(member.user))
                     },
                     hidden: {
                         guild: guild.id
@@ -77,7 +80,7 @@
         const code = req.params.code;
         if (client.verify[code]) {
             try {
-                const interaction = client.verify[code].interaction;
+                const interaction = client.verify[code]!.interaction;
                 if (interaction) {
                     interaction.editReply({
                         embeds: [
@@ -105,11 +108,11 @@
         const code = req.params.code;
         const secret = req.body.secret;
         if (secret === client.config.verifySecret) {
-            const guild = await client.guilds.fetch(client.roleMenu[code].guild);
+            const guild = await client.guilds.fetch(client.roleMenu[code]!.guild);
             if (!guild) {
                 return res.status(404);
             }
-            const member = await guild.members.fetch(client.roleMenu[code].user);
+            const member = await guild.members.fetch(client.roleMenu[code]!.user);
             if (!member) {
                 return res.status(404);
             }
@@ -123,7 +126,7 @@
         const code = req.params.code;
         if (client.roleMenu[code] !== undefined) {
             try {
-                const interaction = client.roleMenu[code].interaction;
+                const interaction = client.roleMenu[code]!.interaction;
                 if (interaction) {
                     interaction.editReply({
                         embeds: [
diff --git a/src/commands/mod/viewas.ts b/src/commands/mod/viewas.ts
index 6216a37..9c163a7 100644
--- a/src/commands/mod/viewas.ts
+++ b/src/commands/mod/viewas.ts
@@ -22,13 +22,7 @@
         .addUserOption((option) => option.setName("member").setDescription("The member to view as").setRequired(true));
 
 const callback = async (interaction: CommandInteraction): Promise<void> => {
-    /*
-     * {
-            categoryObject: channel[],
-            categoryObject: channel[],
-            "null": channel[]
-        }
-    */
+
     const m = await interaction.reply({embeds: LoadingEmbed, ephemeral: true, fetchReply: true})
 
     let channels: Record<string, GuildBasedChannel[]> = {"": []};
@@ -105,7 +99,7 @@
             threads = channel.threads.cache.toJSON().map((t) => t as Discord.ThreadChannel);
         }
         const nsfw = ("nsfw" in channel ? channel.nsfw : false) && NSFWAvailable.includes(channelType)
-        const emojiName = channelTypeEmoji[channelType] + (nsfw ? "_NSFW" : "");
+        const emojiName = channelTypeEmoji[channelType.valueOf()] + (nsfw ? "_NSFW" : "");
         const emoji = getEmojiByName("ICONS.CHANNEL." + (threads.length ? "THREAD_CHANNEL" : emojiName));
         let current = `${emoji} ${channel.name}`;
         if (threads.length) {
diff --git a/src/commands/settings/welcome.ts b/src/commands/settings/welcome.ts
index 9892638..e7143fb 100644
--- a/src/commands/settings/welcome.ts
+++ b/src/commands/settings/welcome.ts
@@ -8,7 +8,9 @@
     MessageComponentInteraction,
     Role,
     ButtonStyle,
-    AutocompleteInteraction
+    AutocompleteInteraction,
+    GuildChannel,
+    EmbedBuilder
 } from "discord.js";
 import type { SlashCommandSubcommandBuilder } from "@discordjs/builders";
 import EmojiEmbed from "../../utils/generateEmojiEmbed.js";
@@ -50,17 +52,17 @@
     });
     let m: Message;
     if (
-        interaction.options.getRole("role") ||
-        interaction.options.getChannel("channel") ||
-        interaction.options.getString("message")
+        interaction.options.get("role")?.role ||
+        interaction.options.get("channel")?.channel ||
+        interaction.options.get("message")?.value as string
     ) {
         let role: Role | null;
         let ping: Role | null;
         let channel: Channel | null;
-        const message: string | null = interaction.options.getString("message");
+        const message: string | null = interaction.options.get("message")?.value as string | null;
         try {
-            role = interaction.options.getRole("role") as Role | null;
-            ping = interaction.options.getRole("ping") as Role | null;
+            role = interaction.options.get("role")?.role as Role | null;
+            ping = interaction.options.get("ping")?.role as Role | null;
         } catch {
             return await interaction.editReply({
                 embeds: [
@@ -73,7 +75,7 @@
             });
         }
         try {
-            channel = interaction.options.getChannel("channel") as Channel | null;
+            channel = interaction.options.get("channel")?.channel as Channel | null;
         } catch {
             return await interaction.editReply({
                 embeds: [
@@ -94,13 +96,14 @@
 
         if (role) options.role = renderRole(role);
         if (ping) options.ping = renderRole(ping);
-        if (channel) options.channel = renderChannel(channel);
+        if (channel) options.channel = renderChannel(channel as GuildChannel);
         if (message) options.message = "\n> " + message;
         const confirmation = await new confirmationMessage(interaction)
-            .setEmoji("GUILD.ROLES.EDIT", "GUILD.ROLES.DELETE")
+            .setEmoji("GUILD.ROLES.EDIT")
             .setTitle("Welcome Events")
             .setDescription(generateKeyValueList(options))
             .setColor("Warning")
+            .setFailedMessage("Cancelled", "Warning", "GUILD.ROLES.DELETE") //TODO: Actual Message Needed
             .setInverted(true)
             .send(true);
         if (confirmation.cancelled) return;
@@ -130,7 +133,7 @@
                 };
                 if (role) list.role = entry(role.id, renderRole(role));
                 if (ping) list.ping = entry(ping.id, renderRole(ping));
-                if (channel) list.channel = entry(channel.id, renderChannel(channel.id));
+                if (channel) list.channel = entry(channel.id, renderChannel(channel as GuildChannel));
                 if (message) list.message = entry(message, `\`${message}\``);
                 const data = {
                     meta: {
@@ -185,19 +188,19 @@
                         `**Message:** ${config.welcome.message ? `\n> ${config.welcome.message}` : "*None set*"}\n` +
                             `**Role:** ${
                                 config.welcome.role
-                                    ? renderRole(await interaction.guild!.roles.fetch(config.welcome.role))
+                                    ? renderRole((await interaction.guild!.roles.fetch(config.welcome.role))!)
                                     : "*None set*"
                             }\n` +
                             `**Ping:** ${
                                 config.welcome.ping
-                                    ? renderRole(await interaction.guild!.roles.fetch(config.welcome.ping))
+                                    ? renderRole((await interaction.guild!.roles.fetch(config.welcome.ping))!)
                                     : "*None set*"
                             }\n` +
                             `**Channel:** ${
                                 config.welcome.channel
                                     ? config.welcome.channel == "dm"
                                         ? "DM"
-                                        : renderChannel(await interaction.guild!.channels.fetch(config.welcome.channel))
+                                        : renderChannel((await interaction.guild!.channels.fetch(config.welcome.channel))!)
                                     : "*None set*"
                             }`
                     )
@@ -293,7 +296,7 @@
         }
     } while (!timedOut);
     await interaction.editReply({
-        embeds: [m.embeds[0]!.setFooter({ text: "Message timed out" })],
+        embeds: [new EmbedBuilder(m.embeds[0]!.data).setFooter({ text: "Message timed out" })],
         components: []
     });
 };
