diff --git a/src/automations/roleMenu.ts b/src/automations/roleMenu.ts
index 1b5f3eb..b13f949 100644
--- a/src/automations/roleMenu.ts
+++ b/src/automations/roleMenu.ts
@@ -34,7 +34,7 @@
             itt += 1
             code = ""
             for (let i = 0; i < length; i++) { code += chars.charAt(Math.floor(Math.random() * chars.length)); }
-            if (code in interaction.client.roleMenu) continue;
+            if (code in client.roleMenu) continue;
             if (itt > 1000) {
                 itt = 0
                 length += 1
@@ -42,7 +42,7 @@
             }
             break;
         }
-        interaction.client.roleMenu[code] = {
+        client.roleMenu[code] = {
             guild: interaction.guild.id,
             guildIcon: interaction.guild.iconURL({format: "png"}),
             user: interaction.member.user.id,
diff --git a/src/automations/tickets/create.ts b/src/automations/tickets/create.ts
index af5ac0d..06e7e07 100644
--- a/src/automations/tickets/create.ts
+++ b/src/automations/tickets/create.ts
@@ -10,8 +10,7 @@
 }
 
 export default async function (interaction) {
-    // @ts-ignore
-    const { log, NucleusColors, entry, renderUser, renderChannel, renderDelta } = interaction.client.logger
+    const { log, NucleusColors, entry, renderUser, renderChannel, renderDelta } = client.logger
 
     let config = await client.database.read(interaction.guild.id);
     if (!config.tickets.enabled || !config.tickets.category) {
@@ -196,7 +195,7 @@
                 guild: interaction.guild.id
             }
         }
-        log(data, interaction.client);
+        log(data, client);
     } catch (e) { console.log(e)}
     await interaction.editReply({embeds: [new generateEmojiEmbed()
         .setTitle("Create Ticket")
diff --git a/src/automations/tickets/delete.ts b/src/automations/tickets/delete.ts
index 1d577a4..a974b2e 100644
--- a/src/automations/tickets/delete.ts
+++ b/src/automations/tickets/delete.ts
@@ -5,7 +5,7 @@
 
 export default async function (interaction) {
     // @ts-ignore
-    const { log, NucleusColors, entry, renderUser, renderChannel, renderDelta } = interaction.client.logger
+    const { log, NucleusColors, entry, renderUser, renderChannel, renderDelta } = client.logger
 
     let config = await client.database.read(interaction.guild.id);
     let thread = false; let threadChannel
@@ -45,7 +45,7 @@
                 guild: interaction.guild.id
             }
         }
-        log(data, interaction.client);
+        log(data, client);
         interaction.channel.delete();
         return;
     } else if (status == "Active") {
@@ -95,7 +95,7 @@
                 guild: interaction.guild.id
             }
         }
-        log(data, interaction.client);
+        log(data, client);
         await interaction.editReply({embeds: [new generateEmojiEmbed()
             .setTitle("Close Ticket")
             .setDescription("This ticket has been closed.\nType `/ticket close` again to delete it.")
diff --git a/src/automations/verify.ts b/src/automations/verify.ts
index bf26505..f84ba20 100644
--- a/src/automations/verify.ts
+++ b/src/automations/verify.ts
@@ -10,8 +10,7 @@
 }
 
 export default async function(interaction) {
-    // @ts-ignore
-    let verify = interaction.client.verify
+    let verify = client.verify
     await interaction.reply({embeds: [new generateEmojiEmbed()
         .setTitle("Loading")
         .setDescription(step(-1))
diff --git a/src/commands/categorisationTest.ts b/src/commands/categorisationTest.ts
index 33f99e9..4a28841 100644
--- a/src/commands/categorisationTest.ts
+++ b/src/commands/categorisationTest.ts
@@ -10,8 +10,7 @@
     .setDescription("Categorises your servers channels")
 
 const callback = async (interaction: CommandInteraction) => {
-    // @ts-ignore
-    const { renderChannel } = interaction.client.logger
+    const { renderChannel } = client.logger
 
     let channels = interaction.guild.channels.cache.filter(c => c.type !== "GUILD_CATEGORY");
     let categorised = {}
diff --git a/src/commands/mod/mute.ts b/src/commands/mod/mute.ts
index ef0a7db..79beeb3 100644
--- a/src/commands/mod/mute.ts
+++ b/src/commands/mod/mute.ts
@@ -22,8 +22,7 @@
         .addChoices([["Yes", "yes"], ["No", "no"]]))
 
 const callback = async (interaction: CommandInteraction): Promise<any> => {
-    // @ts-ignore
-    const { log, NucleusColors, renderUser, entry } = interaction.client.logger
+    const { log, NucleusColors, renderUser, entry } = client.logger
     const user = interaction.options.getMember("user") as GuildMember
     const reason = interaction.options.getString("reason")
     const time = {
@@ -200,7 +199,7 @@
                 guild: interaction.guild.id
             }
         }
-        log(data, interaction.client);
+        log(data, client);
     } else {
         await interaction.editReply({embeds: [new generateEmojiEmbed()
             .setEmoji("PUNISH.MUTE.GREEN")
diff --git a/src/commands/mod/nick.ts b/src/commands/mod/nick.ts
index 96738c6..c09e197 100644
--- a/src/commands/mod/nick.ts
+++ b/src/commands/mod/nick.ts
@@ -57,7 +57,7 @@
             let nickname = interaction.options.getString("name")
             member.setNickname(nickname ?? null, "Nucleus Nickname command")
             // @ts-ignore
-            const { log, NucleusColors, entry, renderUser, renderDelta, getAuditLog } = interaction.client.logger
+            const { log, NucleusColors, entry, renderUser, renderDelta, getAuditLog } = client.logger
             let data = {
                 meta: {
                     type: 'memberUpdate',
@@ -78,7 +78,7 @@
                     guild: interaction.guild.id
                 }
             }
-            log(data, interaction.client);
+            log(data, client);
         } catch {
             await interaction.editReply({embeds: [new generateEmojiEmbed()
                 .setEmoji("PUNISH.NICKNAME.RED")
diff --git a/src/commands/mod/warn.ts b/src/commands/mod/warn.ts
index bd4bcff..b8fb98f 100644
--- a/src/commands/mod/warn.ts
+++ b/src/commands/mod/warn.ts
@@ -17,8 +17,7 @@
     )
 
 const callback = async (interaction: CommandInteraction): Promise<any> => {
-    // @ts-ignore
-    const { log, NucleusColors, renderUser, entry } = interaction.client.logger
+    const { log, NucleusColors, renderUser, entry } = client.logger
     // TODO:[Modals] Replace this with a modal
     let confirmation = await new confirmationMessage(interaction)
         .setEmoji("PUNISH.WARN.RED")
@@ -77,7 +76,7 @@
                 guild: interaction.guild.id
             }
         }
-        log(data, interaction.client);
+        log(data, client);
         let failed = (dmd == false && interaction.options.getString("notify") != "no")
         if (!failed) {
             await interaction.editReply({embeds: [new generateEmojiEmbed()
diff --git a/src/commands/nucleus/invite.ts b/src/commands/nucleus/invite.ts
index 44934e1..8b25820 100644
--- a/src/commands/nucleus/invite.ts
+++ b/src/commands/nucleus/invite.ts
@@ -2,6 +2,7 @@
 import { SlashCommandSubcommandBuilder } from "@discordjs/builders";
 import { WrappedCheck } from "jshaiku";
 import generateEmojiEmbed from "../../utils/generateEmojiEmbed.js";
+import client from "../../utils/client.js"
 
 const command = (builder: SlashCommandSubcommandBuilder) =>
     builder
@@ -17,7 +18,7 @@
     ], components: [new MessageActionRow().addComponents([new MessageButton()
         .setLabel("Invite")
         .setStyle("LINK")
-        .setURL(`https://discord.com/api/oauth2/authorize?client_id=${interaction.client.user.id}&permissions=295157886134&scope=bot%20applications.commands`)
+        .setURL(`https://discord.com/api/oauth2/authorize?client_id=${client.user.id}&permissions=295157886134&scope=bot%20applications.commands`)
     ])], ephemeral: true});
 }
 
diff --git a/src/commands/nucleus/ping.ts b/src/commands/nucleus/ping.ts
index ab23bf7..58413c6 100644
--- a/src/commands/nucleus/ping.ts
+++ b/src/commands/nucleus/ping.ts
@@ -2,6 +2,7 @@
 import { SlashCommandSubcommandBuilder } from "@discordjs/builders";
 import generateEmojiEmbed from "../../utils/generateEmojiEmbed.js";
 import { WrappedCheck } from "jshaiku";
+import client from "../../utils/client.js"
 
 const command = (builder: SlashCommandSubcommandBuilder) =>
     builder
@@ -23,8 +24,8 @@
         .setTitle("Ping")
         .setDescription(
             `**Ping:** \`${ping}ms\`\n` +
-            `**To Discord:** \`${interaction.client.ws.ping}ms\`\n` +
-            `**From Expected:** \`±${Math.abs((ping / 2) - interaction.client.ws.ping)}ms\``
+            `**To Discord:** \`${client.ws.ping}ms\`\n` +
+            `**From Expected:** \`±${Math.abs((ping / 2) - client.ws.ping)}ms\``
         )
         .setEmoji("CHANNEL.SLOWMODE.OFF")
         .setStatus("Danger")
diff --git a/src/commands/nucleus/stats.ts b/src/commands/nucleus/stats.ts
index c12b950..1a0602e 100644
--- a/src/commands/nucleus/stats.ts
+++ b/src/commands/nucleus/stats.ts
@@ -2,6 +2,7 @@
 import { SlashCommandSubcommandBuilder } from "@discordjs/builders";
 import { WrappedCheck } from "jshaiku";
 import generateEmojiEmbed from "../../utils/generateEmojiEmbed.js";
+import client from "../../utils/client.js"
 
 const command = (builder: SlashCommandSubcommandBuilder) =>
     builder
@@ -13,8 +14,8 @@
         embeds: [new generateEmojiEmbed()
             .setTitle("Stats")
             .setDescription(
-                `**Servers:** ${interaction.client.guilds.cache.size}\n` +
-                `**Ping:** \`${interaction.client.ws.ping*2}ms\``
+                `**Servers:** ${client.guilds.cache.size}\n` +
+                `**Ping:** \`${client.ws.ping*2}ms\``
             )
             .setStatus("Success")
             .setEmoji("GUILD.GRAPHS")
diff --git a/src/commands/nucleus/suggest.ts b/src/commands/nucleus/suggest.ts
index d1d6a03..c07d9b8 100644
--- a/src/commands/nucleus/suggest.ts
+++ b/src/commands/nucleus/suggest.ts
@@ -3,6 +3,7 @@
 import { WrappedCheck } from "jshaiku";
 import confirmationMessage from "../../utils/confirmationMessage.js";
 import generateEmojiEmbed from "../../utils/generateEmojiEmbed.js";
+import client from "../../utils/client.js"
 
 const command = (builder: SlashCommandSubcommandBuilder) =>
     builder
@@ -12,7 +13,7 @@
 
 const callback = async (interaction: CommandInteraction) => {
     // @ts-ignore
-    const { renderUser } = interaction.client.logger
+    const { renderUser } = client.logger
     let suggestion = interaction.options.getString("suggestion");
     let confirmation = await new confirmationMessage(interaction)
         .setEmoji("ICONS.OPP.ADD")
@@ -23,7 +24,7 @@
         .setInverted(true)
     .send()
     if (confirmation.success) {
-        await (interaction.client.channels.cache.get('955161206459600976') as Discord.TextChannel).send({
+        await (client.channels.cache.get('955161206459600976') as Discord.TextChannel).send({
             embeds: [
                 new generateEmojiEmbed()
                     .setTitle(`Suggestion`)
diff --git a/src/commands/server/about.ts b/src/commands/server/about.ts
index 054cad3..895d2cc 100644
--- a/src/commands/server/about.ts
+++ b/src/commands/server/about.ts
@@ -4,6 +4,7 @@
 import generateEmojiEmbed from "../../utils/generateEmojiEmbed.js";
 import getEmojiByName from "../../utils/getEmojiByName.js";
 import generateKeyValueList, { toCapitals } from "../../utils/generateKeyValueList.js";
+import client from "../../utils/client.js"
 
 const command = (builder: SlashCommandSubcommandBuilder) => builder
     .setName("about")
@@ -11,8 +12,7 @@
 
 const callback = async (interaction: CommandInteraction) => {
     let guild = interaction.guild as Guild;
-    // @ts-ignore
-    const { renderUser, renderDelta } = interaction.client.logger
+    const { renderUser, renderDelta } = client.logger
     interaction.reply({embeds: [new generateEmojiEmbed()
         .setTitle("Server Info")
         .setStatus("Success")
diff --git a/src/commands/settings/tickets.ts b/src/commands/settings/tickets.ts
index 895d7d7..670a2f2 100644
--- a/src/commands/settings/tickets.ts
+++ b/src/commands/settings/tickets.ts
@@ -286,7 +286,7 @@
                 options.push(new SelectMenuOption({
                     label: capitalize(type),
                     value: type,
-                    emoji: interaction.client.emojis.cache.get(getEmojiByName(`TICKETS.${type.toUpperCase()}`, "id")),
+                    emoji: client.emojis.cache.get(getEmojiByName(`TICKETS.${type.toUpperCase()}`, "id")),
                     default: inUse.includes(type)
                 }))
             })
diff --git a/src/commands/tag.ts b/src/commands/tag.ts
index c9739c2..80bcbad 100644
--- a/src/commands/tag.ts
+++ b/src/commands/tag.ts
@@ -2,6 +2,7 @@
 import { SlashCommandBuilder } from "@discordjs/builders";
 import { WrappedCheck } from "jshaiku";
 import { callback as statsChannelAdd } from '../automations/statsChannelAdd.js';
+import client from "../utils/client.js"
 
 const command = new SlashCommandBuilder()
     .setName("tag")
diff --git a/src/commands/user/about.ts b/src/commands/user/about.ts
index b497359..0c7a3eb 100644
--- a/src/commands/user/about.ts
+++ b/src/commands/user/about.ts
@@ -5,6 +5,7 @@
 import getEmojiByName from "../../utils/getEmojiByName.js";
 import generateKeyValueList from "../../utils/generateKeyValueList.js";
 import createPageIndicator from "../../utils/createPageIndicator.js";
+import client from "../../utils/client.js"
 
 const command = (builder: SlashCommandSubcommandBuilder) =>
     builder
@@ -26,8 +27,7 @@
 
 
 const callback = async (interaction: CommandInteraction) => {
-    // @ts-ignore
-    const { renderUser, renderDelta } = interaction.client.logger
+    const { renderUser, renderDelta } = client.logger
     let member = (interaction.options.getMember("user") || interaction.member) as Discord.GuildMember;
     let flags: string[] = [];
     if ([
@@ -36,7 +36,7 @@
         "261900651230003201", // Coded
         "511655498676699136", // Zan
     ].includes(member.user.id)) { flags.push("NUCLEUSDEVELOPER") }
-    if ((await interaction.client.guilds.cache.get("684492926528651336")?.members.fetch())?.filter(m => m.roles.cache.has("760896837866749972"))?.map(m => m.id).includes(member.user.id)) { flags.push("CLICKSDEVELOPER") }
+    if ((await client.guilds.cache.get("684492926528651336")?.members.fetch())?.filter(m => m.roles.cache.has("760896837866749972"))?.map(m => m.id).includes(member.user.id)) { flags.push("CLICKSDEVELOPER") }
     member.user.flags.toArray().map(flag => {
         flags.push(flag.toString())
     })
diff --git a/src/commands/user/avatar.ts b/src/commands/user/avatar.ts
index eb9042a..9a84118 100644
--- a/src/commands/user/avatar.ts
+++ b/src/commands/user/avatar.ts
@@ -4,6 +4,7 @@
 import generateEmojiEmbed from "../../utils/generateEmojiEmbed.js";
 import getEmojiByName from "../../utils/getEmojiByName.js";
 import generateKeyValueList from "../../utils/generateKeyValueList.js";
+import client from "../../client.js"
 
 const command = (builder: SlashCommandSubcommandBuilder) =>
     builder
@@ -12,8 +13,7 @@
     .addUserOption(option => option.setName("user").setDescription("The user to get the avatar of | Default: Yourself"))
 
 const callback = async (interaction: CommandInteraction) => {
-    // @ts-ignore
-    const { renderUser } = interaction.client.logger
+    const { renderUser } = client.logger
     let member = (interaction.options.getMember("user") || interaction.member) as Discord.GuildMember;
     await interaction.reply({embeds: [new generateEmojiEmbed()
         .setTitle("User Info")
diff --git a/src/commands/user/track.ts b/src/commands/user/track.ts
index eea0b7b..0e6fafd 100644
--- a/src/commands/user/track.ts
+++ b/src/commands/user/track.ts
@@ -22,8 +22,7 @@
 }
 
 const callback = async (interaction: CommandInteraction) => {
-    // @ts-ignore
-    const { renderUser } = interaction.client.logger;
+    const { renderUser } = client.logger;
     const member = interaction.options.getMember("user") as GuildMember;
     const guild = interaction.guild;
     let config = await client.database.read(guild.id);
@@ -46,7 +45,7 @@
                 label: option.name,
                 value: index.toString(),
                 description: option.track.length == 0 ? "No" : addPlural(option.track.length, "role"),
-                emoji: interaction.client.emojis.resolve(getEmojiByName("TRACKS.SINGLE." + (hasRoleInTrack ? "ACTIVE" : "INACTIVE"), "id"))
+                emoji: client.emojis.resolve(getEmojiByName("TRACKS.SINGLE." + (hasRoleInTrack ? "ACTIVE" : "INACTIVE"), "id"))
             })
         })).setCustomId("select").setMaxValues(1)
         let allowed = []
@@ -166,7 +165,7 @@
     if (member.id == interaction.guild.ownerId) return true
     // Check if the user can manage any of the tracks
     // @ts-ignore
-    let tracks = (await interaction.client.database.get(interaction.guild.id)).tracks
+    let tracks = (await client.database.get(interaction.guild.id)).tracks
     let managed = false
     tracks.forEach(element => { if (element.track.manageableBy.some(role => member.roles.cache.has(role))) managed = true });
     // Check if the user has manage_roles permission
