diff --git a/src/utils/client.ts b/src/utils/client.ts
index 61cf3bf..53267f2 100644
--- a/src/utils/client.ts
+++ b/src/utils/client.ts
@@ -5,6 +5,7 @@
 import { Guilds, History, ModNotes, Premium } from "../utils/database.js";
 import EventScheduler from "../utils/eventScheduler.js";
 import type { RoleMenuSchema } from "../actions/roleMenu.js";
+// @ts-expect-error
 import config from "../config/main.json" assert { type: "json" };
 
 
@@ -38,7 +39,7 @@
 }
 
 const client = new NucleusClient({
-    guilds: new Guilds(),
+    guilds: await new Guilds().setup(),
     history: new History(),
     notes: new ModNotes(),
     premium: new Premium(),
diff --git a/src/utils/commandRegistration/register.ts b/src/utils/commandRegistration/register.ts
index 1b55496..64f6e77 100644
--- a/src/utils/commandRegistration/register.ts
+++ b/src/utils/commandRegistration/register.ts
@@ -1,14 +1,16 @@
 import { Interaction, SlashCommandBuilder } from 'discord.js';
+// @ts-expect-error
 import config from "../../config/main.json" assert { type: "json" };
 import client from "../client.js";
 import fs from "fs";
-import Discord from "discord.js";
 
 
 const colours = {
     red: "\x1b[31m",
     green: "\x1b[32m",
     yellow: "\x1b[33m",
+    blue: "\x1b[34m",
+    purple: "\x1b[35m",
     none: "\x1b[0m"
 }
 
@@ -52,10 +54,10 @@
     if (developmentMode) {
         const guild = await client.guilds.fetch(config.developmentGuildID);
         if (updateCommands) guild.commands.set(processed);
-        console.log(`Commands registered in ${guild.name}`)
+        console.log(`${colours.purple}Commands registered in ${guild.name}${colours.none}`)
     } else {
         if (updateCommands) client.application!.commands.set(processed);
-        console.log(`Commands registered globally`)
+        console.log(`${colours.blue}Commands registered globally${colours.none}`)
     }
 
 };
@@ -120,4 +122,7 @@
     await registerCommandHandler();
     await registerEvents();
     console.log(`${colours.green}Registered commands and events${colours.none}`)
+    console.log(
+        (config.enableDevelopment ? `${colours.purple}Bot started in Development mode` :
+        `${colours.blue}Bot started in Production mode`) + colours.none)
 };
diff --git a/src/utils/commandRegistration/slashCommandBuilder.ts b/src/utils/commandRegistration/slashCommandBuilder.ts
index 76ecabe..45cb8f1 100644
--- a/src/utils/commandRegistration/slashCommandBuilder.ts
+++ b/src/utils/commandRegistration/slashCommandBuilder.ts
@@ -1,5 +1,6 @@
 import type { SlashCommandSubcommandGroupBuilder } from "@discordjs/builders";
 import type { SlashCommandBuilder } from "discord.js";
+// @ts-expect-error
 import config from "../../config/main.json" assert { type: "json" };
 import getSubcommandsInFolder from "./getFilesInFolder.js";
 import client from "../client.js";
diff --git a/src/utils/confirmationMessage.ts b/src/utils/confirmationMessage.ts
index 18e6ea0..87724f3 100644
--- a/src/utils/confirmationMessage.ts
+++ b/src/utils/confirmationMessage.ts
@@ -1,3 +1,4 @@
+import { TextInputBuilder } from "@discordjs/builders";
 import Discord, {
     CommandInteraction,
     Interaction,
@@ -6,8 +7,8 @@
     ButtonBuilder,
     MessageComponentInteraction,
     ModalSubmitInteraction,
-    TextInputComponent,
-    ButtonStyle
+    ButtonStyle,
+    TextInputStyle
 } from "discord.js";
 import { modalInteractionCollector } from "./dualCollector.js";
 import EmojiEmbed from "./generateEmojiEmbed.js";
@@ -65,7 +66,7 @@
         customId: string,
         title: string,
         disabled: boolean,
-        callback: () => Promise<unknown> = async () => null,
+        callback: (() => Promise<unknown>) | null = async () => null,
         callbackClicked: string | null,
         emoji?: string,
         initial?: boolean
@@ -76,7 +77,7 @@
             value: callbackClicked,
             emoji: emoji,
             active: initial ?? false,
-            onClick: callback,
+            onClick: callback ?? (async () => null),
             response: null
         };
         return this;
@@ -129,7 +130,10 @@
                 );
             const components = [];
             for (let i = 0; i < fullComponents.length; i += 5) {
-                components.push(new ActionRowBuilder().addComponents(fullComponents.slice(i, i + 5)));
+                components.push(new ActionRowBuilder<
+                    Discord.ButtonBuilder | Discord.StringSelectMenuBuilder |
+                    Discord.RoleSelectMenuBuilder | Discord.UserSelectMenuBuilder
+                >().addComponents(fullComponents.slice(i, i + 5)));
             }
             const object = {
                 embeds: [
@@ -155,7 +159,7 @@
             let m: Message;
             try {
                 if (editOnly) {
-                    m = (await this.interaction.editReply(object)) as Message;
+                    m = (await this.interaction.editReply(object)) as unknown as Message;
                 } else {
                     m = (await this.interaction.reply(object)) as unknown as Message;
                 }
@@ -194,17 +198,17 @@
                 continue;
             } else if (component.customId === "reason") {
                 await component.showModal(
-                    new Discord.Modal()
+                    new Discord.ModalBuilder()
                         .setCustomId("modal")
                         .setTitle("Editing reason")
                         .addComponents(
-                            new ActionRowBuilder<TextInputComponent>().addComponents(
-                                new TextInputComponent()
+                            new ActionRowBuilder<TextInputBuilder>().addComponents(
+                                new TextInputBuilder()
                                     .setCustomId("reason")
                                     .setLabel("Reason")
                                     .setMaxLength(2000)
                                     .setRequired(false)
-                                    .setStyle("PARAGRAPH")
+                                    .setStyle(TextInputStyle.Paragraph)
                                     .setPlaceholder("Spammed in #general")
                                     .setValue(this.reason ? this.reason : "")
                             )
@@ -219,13 +223,13 @@
                             .setEmoji(this.emoji)
                     ],
                     components: [
-                        new ActionRowBuilder().addComponents([
+                        new ActionRowBuilder<Discord.ButtonBuilder>().addComponents(
                             new ButtonBuilder()
                                 .setLabel("Back")
                                 .setEmoji(getEmojiByName("CONTROL.LEFT", "id"))
                                 .setStyle(ButtonStyle.Primary)
                                 .setCustomId("back")
-                        ])
+                        )
                     ]
                 });
                 let out;
@@ -269,7 +273,12 @@
         }
         if (newReason) returnValue.newReason = newReason;
 
-        return returnValue;
+        const typedReturnValue = returnValue as {cancelled: true} |
+        { success: boolean, components: Record<string, CustomBoolean<unknown>>, newReason?: string} |
+        { newReason: string, components: Record<string, CustomBoolean<unknown>> } |
+        { components: Record<string, CustomBoolean<unknown>> };
+
+        return typedReturnValue;
     }
 
     async timeoutError(): Promise<void> {
diff --git a/src/utils/database.ts b/src/utils/database.ts
index 2ae6af9..2624fc9 100644
--- a/src/utils/database.ts
+++ b/src/utils/database.ts
@@ -1,5 +1,6 @@
 import type Discord from "discord.js";
 import { Collection, MongoClient } from "mongodb";
+// @ts-expect-error
 import config from "../config/main.json" assert { type: "json" };
 
 const mongoClient = new MongoClient(config.mongoUrl);
@@ -16,6 +17,7 @@
     }
 
     async setup(): Promise<Guilds> {
+        // @ts-expect-error
         this.defaultData = (await import("../config/default.json", { assert: { type: "json" } }))
             .default as unknown as GuildConfig;
         return this;
@@ -184,9 +186,7 @@
 export interface GuildConfig {
     id: string;
     version: number;
-    singleEventNotifications: {
-        statsChannelDeleted: boolean;
-    };
+    singleEventNotifications: Record<string, boolean>;
     filters: {
         images: {
             NSFW: boolean;
diff --git a/src/utils/defaultEmbeds.ts b/src/utils/defaultEmbeds.ts
index 2334504..39a6080 100644
--- a/src/utils/defaultEmbeds.ts
+++ b/src/utils/defaultEmbeds.ts
@@ -4,3 +4,8 @@
 export const LoadingEmbed = [
     new EmojiEmbed().setDescription(`${getEmojiByName("NUCLEUS.LOADING")} One moment...`).setStatus("Danger")
 ];
+
+export const LinkWarningFooter = {
+    text: "The button below will take you to a website set by the server moderators. Do not enter any passwords unless it is from a trusted website.",
+    iconURL: "https://cdn.discordapp.com/emojis/952295894370369587.webp?size=128&quality=lossless"
+}
\ No newline at end of file
diff --git a/src/utils/dualCollector.ts b/src/utils/dualCollector.ts
index abc6bb3..714a2d9 100644
--- a/src/utils/dualCollector.ts
+++ b/src/utils/dualCollector.ts
@@ -1,4 +1,4 @@
-import Discord, { Interaction, Message, MessageComponentInteraction } from "discord.js";
+import Discord, { Client, Interaction, Message, MessageComponentInteraction } from "discord.js";
 import client from "./client.js";
 
 export default async function (
@@ -26,7 +26,7 @@
                     try {
                         m.delete();
                     } catch (e) {
-                        client._error(e);
+                        client.emit("error", e as Error);
                     }
                     resolve(m);
                 });
@@ -61,7 +61,7 @@
                 .on("collect", (i: Interaction) => {
                     resolve(i);
                 });
-            const mod = new Discord.InteractionCollector(client, {
+            const mod = new Discord.InteractionCollector(client as Client, {
                 filter: (i: Interaction) => modalFilter(i),
                 time: 300000
             }).on("collect", async (i: Interaction) => {
diff --git a/src/utils/eventScheduler.ts b/src/utils/eventScheduler.ts
index 203e05b..0a32a1e 100644
--- a/src/utils/eventScheduler.ts
+++ b/src/utils/eventScheduler.ts
@@ -2,6 +2,7 @@
 import client from "./client.js";
 import * as fs from "fs";
 import * as path from "path";
+// @ts-expect-error
 import config from "../config/main.json" assert { type: "json" };
 
 class EventScheduler {
@@ -19,11 +20,11 @@
             const guild = await client.guilds.fetch(job.attrs.data.guild);
             const user = await guild.members.fetch(job.attrs.data.user);
             const role = await guild.roles.fetch(job.attrs.data.role);
-            await user.roles.remove(role);
+            if (role) await user.roles.remove(role);
             await job.remove();
         });
         this.agenda.define("deleteFile", async (job) => {
-            fs.rm(path.resolve("dist/utils/temp", job.attrs.data.fileName), client._error);
+            fs.rm(path.resolve("dist/utils/temp", job.attrs.data.fileName), (e) => { client.emit("error", e as Error); });
             await job.remove();
         });
         this.agenda.define("naturalUnmute", async (job) => {
@@ -34,7 +35,7 @@
             try {
                 await client.database.history.create("unmute", user.guild.id, user.user, null, null, null, null);
             } catch (e) {
-                client._error(e);
+                client.emit("error", e as Error);
             }
             const data = {
                 meta: {
@@ -48,7 +49,7 @@
                 list: {
                     memberId: entry(user.user.id, `\`${user.user.id}\``),
                     name: entry(user.user.id, renderUser(user.user)),
-                    unmuted: entry(new Date().getTime(), renderDelta(new Date().getTime())),
+                    unmuted: entry(new Date().getTime().toString(), renderDelta(new Date().getTime())),
                     unmutedBy: entry(null, "*Time out ended*")
                 },
                 hidden: {
diff --git a/src/utils/getEmojiByName.ts b/src/utils/getEmojiByName.ts
index 3fa2b53..7824982 100644
--- a/src/utils/getEmojiByName.ts
+++ b/src/utils/getEmojiByName.ts
@@ -1,3 +1,4 @@
+// @ts-expect-error
 import emojis from "../config/emojis.json" assert { type: "json" };
 
 interface EmojisIndex {
diff --git a/src/utils/log.ts b/src/utils/log.ts
index a578b69..b097798 100644
--- a/src/utils/log.ts
+++ b/src/utils/log.ts
@@ -25,7 +25,7 @@
         const delta = num2 - num1;
         return `${num1} -> ${num2} (${delta > 0 ? "+" : ""}${delta})`;
     },
-    entry(value: string, displayValue: string): { value: string; displayValue: string } {
+    entry(value: string | null, displayValue: string): { value: string | null; displayValue: string } {
         return { value: value, displayValue: displayValue };
     },
     renderChannel(channel: Discord.GuildChannel | Discord.ThreadChannel) {
diff --git a/src/utils/singleNotify.ts b/src/utils/singleNotify.ts
index 8f011e3..e762487 100644
--- a/src/utils/singleNotify.ts
+++ b/src/utils/singleNotify.ts
@@ -16,6 +16,7 @@
     severity: "Critical" | "Warning" | "Info" = "Info"
 ) {
     const data = await client.database.guilds.read(guild);
+    if (data.logging.staff.channel === null) return;
     if (message === true) {
         return await client.database.guilds.write(guild, {
             [`singleEventNotifications.${type}`]: false
@@ -28,6 +29,7 @@
     try {
         const channel = await client.channels.fetch(data.logging.staff.channel);
         if (!channel) return;
+        if (!channel.isTextBased()) return;
         await channel.send({
             embeds: [
                 new EmojiEmbed()
diff --git a/src/utils/temp/generateFileName.ts b/src/utils/temp/generateFileName.ts
index 8534846..3aab64c 100644
--- a/src/utils/temp/generateFileName.ts
+++ b/src/utils/temp/generateFileName.ts
@@ -12,7 +12,7 @@
     if (fs.existsSync(`./${fileName}`)) {
         fileName = generateFileName(ending);
     }
-    client.database.eventScheduler.schedule("deleteFile", new Date().getTime() + 60 * 1000, {
+    client.database.eventScheduler.schedule("deleteFile", (new Date().getTime() + 60 * 1000).toString(), {
         fileName: `${fileName}.${ending}`
     });
     return path.join(__dirname, fileName + "." + ending);
