diff --git a/src/utils/calculate.ts b/src/utils/calculate.ts
index 6bbbe2e..98d82c3 100644
--- a/src/utils/calculate.ts
+++ b/src/utils/calculate.ts
@@ -23,7 +23,7 @@
 
 const tickets = ["support", "report", "question", "issue", "suggestion", "other"];
 
-const toHexInteger = (permissions, array?) => {
+const toHexInteger = (permissions: string[], array?: string[]) => {
     if (!array) {
         array = logs;
     }
@@ -35,7 +35,7 @@
     return int.toString(16);
 };
 
-const toHexArray = (permissionsHex, array?) => {
+const toHexArray = (permissionsHex: string, array?: string[]) => {
     if (!array) {
         array = logs;
     }
@@ -45,7 +45,7 @@
         .split("")
         .reverse();
     for (const index in int) {
-        if (int[index] === "1" && array.length > index) {
+        if (int[index] === "1" && array.length > parseInt(index)) {
             permissions.push(array[index]);
         }
     }
diff --git a/src/utils/client.ts b/src/utils/client.ts
index 0ce61f1..1795cfa 100644
--- a/src/utils/client.ts
+++ b/src/utils/client.ts
@@ -1,3 +1,4 @@
+// @ts-expect-error
 import { HaikuClient } from "jshaiku";
 import { Intents } from "discord.js";
 import config from "../config/main.json" assert { type: "json" };
diff --git a/src/utils/convertCurlyBracketString.ts b/src/utils/convertCurlyBracketString.ts
index 53c3267..5d2c23d 100644
--- a/src/utils/convertCurlyBracketString.ts
+++ b/src/utils/convertCurlyBracketString.ts
@@ -1,6 +1,14 @@
-async function convertCurlyBracketString(str, memberID, memberName, serverName, members): Promise<string> {
+import type { GuildMember, GuildMemberManager } from "discord.js";
+
+async function convertCurlyBracketString(
+    str: string,
+    memberID: string,
+    memberName: string,
+    serverName: string,
+    members: GuildMemberManager
+): Promise<string> {
     const memberCount = (await members.fetch()).size;
-    const bots = (await members.fetch()).filter((m) => m.user.bot).size;
+    const bots = (await members.fetch()).filter((m: GuildMember) => m.user.bot).size;
     str = str
         .replace("{member:mention}", memberID ? `<@${memberID}>` : "{member:mention}")
         .replace("{member:name}", memberName ? `${memberName}` : "{member:name}")
diff --git a/src/utils/createLogException.ts b/src/utils/createLogException.ts
index 7a6c492..329f422 100644
--- a/src/utils/createLogException.ts
+++ b/src/utils/createLogException.ts
@@ -3,7 +3,7 @@
 export default function (guild: string, channel: string, message: string) {
     client.noLog.push(`${guild}/${channel}/${message}`);
     setTimeout(() => {
-        client.noLog = client.noLog.filter((i) => {
+        client.noLog = client.noLog.filter((i: string) => {
             return i !== `${guild}/${channel}/${message}`;
         });
     }, 500);
diff --git a/src/utils/database.ts b/src/utils/database.ts
index 04c9e24..cda63d6 100644
--- a/src/utils/database.ts
+++ b/src/utils/database.ts
@@ -32,7 +32,6 @@
     constructor() {
         this.guilds = database.collection<GuildConfig>("guilds");
         this.defaultData = null;
-        return this;
     }
 
     async setup() {
@@ -122,11 +121,9 @@
 
 export class History {
     histories: Collection<HistorySchema>;
-    defaultData: GuildConfig;
 
-    async setup() {
+    constructor() {
         this.histories = database.collection<HistorySchema>("history");
-        return this;
     }
 
     async create(
@@ -135,20 +132,20 @@
         user: Discord.User,
         moderator: Discord.User | null,
         reason: string | null,
-        before?: null,
-        after?: null,
-        amount?: null
+        before?: string | null,
+        after?: string | null,
+        amount?: string | null
     ) {
         await this.histories.insertOne({
             type: type,
             guild: guild,
             user: user.id,
-            moderator: moderator.id,
+            moderator: moderator ? moderator.id : null,
             reason: reason,
             occurredAt: new Date(),
-            before: before,
-            after: after,
-            amount: amount
+            before: before ?? null,
+            after: after ?? null,
+            amount: amount ?? null
         });
     }
 
@@ -173,11 +170,9 @@
 
 export class ModNotes {
     modNotes: Collection<ModNoteSchema>;
-    defaultData: GuildConfig;
 
-    async setup() {
+    constructor() {
         this.modNotes = database.collection<ModNoteSchema>("modNotes");
-        return this;
     }
 
     async create(guild: string, user: string, note: string | null) {
@@ -193,9 +188,8 @@
 export class Premium {
     premium: Collection<PremiumSchema>;
 
-    async setup() {
+    constructor() {
         this.premium = database.collection<PremiumSchema>("premium");
-        return this;
     }
 
     async hasPremium(guild: string) {
@@ -342,7 +336,7 @@
     guild: string;
     user: string;
     moderator: string | null;
-    reason: string;
+    reason: string | null;
     occurredAt: Date;
     before: string | null;
     after: string | null;
@@ -352,7 +346,7 @@
 export interface ModNoteSchema {
     guild: string;
     user: string;
-    note: string;
+    note: string | null;
 }
 
 export interface PremiumSchema {
diff --git a/src/utils/generateKeyValueList.ts b/src/utils/generateKeyValueList.ts
index 54b8d99..b2b33e6 100644
--- a/src/utils/generateKeyValueList.ts
+++ b/src/utils/generateKeyValueList.ts
@@ -14,8 +14,8 @@
 }
 
 export function toCapitals(s: string) {
-    if (s.startsWith(undefined)) return "";
-    return s[0].toUpperCase() + s.slice(1).toLowerCase();
+    if (s === "") return "";
+    return s[0]!.toUpperCase() + s.slice(1).toLowerCase();
 }
 
 function keyValueList(data: Record<string, string>) {
diff --git a/src/utils/log.ts b/src/utils/log.ts
index cd2f3c7..d831a4b 100644
--- a/src/utils/log.ts
+++ b/src/utils/log.ts
@@ -37,7 +37,7 @@
         return `<${emoji.animated ? "a" : ""}:${emoji.name}:${emoji.id}> [\`:${emoji.name}:\`]`;
     }
 
-    public readonly NucleusColors = {
+    public readonly NucleusColors: Record<string, number> = {
         red: 0xf27878,
         yellow: 0xf2d478,
         green: 0x68d49e
