diff --git a/src/automations/roleMenu.ts b/src/automations/roleMenu.ts
index cac15a5..10342ff 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 9642089..ffc89d9 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 854f38f..1ae8dff 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 46e2871..092fdaa 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 aac271e..e6bfecf 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 8d6d8c9..7ef80dd 100644
--- a/src/commands/tag.ts
+++ b/src/commands/tag.ts
@@ -2,13 +2,14 @@
 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")
     .setDescription("Get and manage the servers tags")
 
 const callback = (interaction: CommandInteraction) => {
-    try { statsChannelAdd(interaction.client, interaction.member); } catch {} // TODO: REMOVE THIS FOR PRODUCTION
+    try { statsChannelAdd(client, interaction.member); } catch {} // TODO: REMOVE THIS FOR PRODUCTION
     interaction.reply("This command is not yet finished [tag]");
 }
 
diff --git a/src/commands/user/about.ts b/src/commands/user/about.ts
index bdd73c4..00aeffe 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 f96f718..ae3f7ec 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
