diff --git a/.eslintrc.json b/.eslintrc.json
index 873db2b..4b4e25d 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -4,7 +4,7 @@
         "es2020": true,
         "node": true
     },
-    "ignorePatterns": ["dist/"],
+    "ignorePatterns": ["dist/", "src/Unfinished/"],
     "extends": ["eslint:recommended", "plugin:@typescript-eslint/strict", "prettier"],
     "parser": "@typescript-eslint/parser",
     "parserOptions": {
@@ -23,8 +23,6 @@
                 "caughtErrorsIgnorePattern": "^_"
             }
         ],
-        "@typescript-eslint/no-explicit-any": "error",
-        "@typescript-eslint/no-unnecessary-condition": "off", // TODO: remove this rule
-        "no-constant-condition": "off"
+        "@typescript-eslint/no-explicit-any": "error"
     }
 }
diff --git a/package.json b/package.json
index 6ab482d..b211473 100644
--- a/package.json
+++ b/package.json
@@ -28,11 +28,11 @@
     "scripts": {
         "build": "tsc",
         "start": "node --experimental-json-modules --enable-source-maps dist/index.js",
-        "dev": "rm -rf dist && eslint . --fix && tsc && node --experimental-json-modules --enable-source-maps dist/index.js",
-        "force-dev": "rm -rf dist && eslint . --fix; tsc-suppress && node --experimental-json-modules --enable-source-maps dist/index.js",
-        "lint": "echo 'Style checking...'; prettier --check .; echo 'Linting...'; eslint .; echo 'To auto-fix everything possible, please run `yarn lint-fix`'; true",
-        "lint-fix": "echo 'Fixing eslint issues...'; eslint . --fix; echo 'Reformatting...'; prettier --write --loglevel warn --cache .; true",
-        "lint-list": "echo 'Style checking...'; prettier --check .; echo 'Linting...'; eslint .; echo 'To view errors in more detail, please run `yarn lint`'; true",
+        "dev": "rm -rf dist && eslint src --fix && tsc && node --experimental-json-modules --enable-source-maps dist/index.js",
+        "force-dev": "rm -rf dist && eslint src --fix; tsc-suppress && node --experimental-json-modules --enable-source-maps dist/index.js",
+        "lint": "echo 'Style checking...'; prettier --check .; echo 'Linting...'; eslint src; echo 'To auto-fix everything possible, please run `yarn lint-fix`'; true",
+        "lint-fix": "echo 'Fixing eslint issues...'; eslint src --fix; echo 'Reformatting...'; prettier --write --loglevel warn --cache .; true",
+        "lint-list": "echo 'Style checking...'; prettier --check .; echo 'Linting...'; eslint src; echo 'To view errors in more detail, please run `yarn lint`'; true",
         "setup": "node Installer.js"
     },
     "repository": {
@@ -56,6 +56,7 @@
         "@typescript-eslint/parser": "^5.32.0",
         "eslint-config-prettier": "^8.5.0",
         "prettier": "^2.7.1",
+        "prettier-eslint": "^15.0.1",
         "tsc-suppress": "^1.0.7"
     }
 }
diff --git a/src/Unfinished/all.ts b/src/Unfinished/all.ts
index 758947b..cf2c9e4 100644
--- a/src/Unfinished/all.ts
+++ b/src/Unfinished/all.ts
@@ -176,11 +176,12 @@
         if (all) {
             members.forEach((member) => {
                 let applies = true;
-                filters.forEach((filter) => {
+                for (const filter of filters) {
                     if (!filter.check(member)) {
                         applies = false;
+                        break;
                     }
-                });
+                }
                 if (applies) {
                     affected.push(member);
                 }
@@ -188,11 +189,12 @@
         } else {
             members.forEach((member) => {
                 let applies = false;
-                filters.forEach((filter) => {
+                for (const filter of filters) {
                     if (filter.check(member)) {
                         applies = true;
+                        break;
                     }
-                });
+                }
                 if (applies) {
                     affected.push(member);
                 }
diff --git a/src/commands/settings/tickets.ts b/src/commands/settings/tickets.ts
index 8b84770..ca170be 100644
--- a/src/commands/settings/tickets.ts
+++ b/src/commands/settings/tickets.ts
@@ -67,7 +67,7 @@
         fetchReply: true
     })) as Message;
     const options = {
-        enabled: interaction.options.getString("enabled") as string | boolean,
+        enabled: interaction.options.getString("enabled") as string | boolean | null,
         category: interaction.options.getChannel("category"),
         maxtickets: interaction.options.getNumber("maxticketsperuser"),
         supportping: interaction.options.getRole("supportrole")
diff --git a/src/commands/tags/list.ts b/src/commands/tags/list.ts
index bf124bd..e9e8b41 100644
--- a/src/commands/tags/list.ts
+++ b/src/commands/tags/list.ts
@@ -82,7 +82,9 @@
     })) as Message;
     let page = 0;
     let selectPaneOpen = false;
-    while (true) {
+    let cancelled = false;
+    let timedOut = false;
+    while (!cancelled && !timedOut) {
         let selectPane: MessageActionRow[] = [];
 
         if (selectPaneOpen) {
@@ -136,7 +138,8 @@
         try {
             i = await m.awaitMessageComponent({ time: 300000 });
         } catch (e) {
-            break;
+            timedOut = true;
+            continue;
         }
         i.deferUpdate();
         if ((i.component as MessageActionRowComponent).customId === "left") {
@@ -151,66 +154,18 @@
             page = parseInt((i as SelectMenuInteraction).values[0]!);
             selectPaneOpen = false;
         } else {
-            const em = new Discord.MessageEmbed(pages[page]!.embed);
-            em.setDescription(em.description + "\n\n" + createPageIndicator(pages.length, page) + " | Message closed");
-            await interaction.editReply({
-                embeds: [em],
-                components: [
-                    new MessageActionRow().addComponents([
-                        new MessageButton()
-                            .setCustomId("left")
-                            .setEmoji(getEmojiByName("CONTROL.LEFT", "id"))
-                            .setStyle("SECONDARY")
-                            .setDisabled(true),
-                        new MessageButton()
-                            .setCustomId("select")
-                            .setEmoji(getEmojiByName("CONTROL.MENU", "id"))
-                            .setStyle(selectPaneOpen ? "PRIMARY" : "SECONDARY")
-                            .setDisabled(true),
-                        new MessageButton()
-                            .setCustomId("right")
-                            .setEmoji(getEmojiByName("CONTROL.RIGHT", "id"))
-                            .setStyle("SECONDARY")
-                            .setDisabled(true),
-                        new MessageButton()
-                            .setCustomId("close")
-                            .setEmoji(getEmojiByName("CONTROL.CROSS", "id"))
-                            .setStyle("DANGER")
-                            .setDisabled(true)
-                    ])
-                ]
-            });
-            return;
+            cancelled = true;
         }
     }
     const em = new Discord.MessageEmbed(pages[page]!.embed);
-    em.setDescription(em.description + "\n\n" + createPageIndicator(pages.length, page) + " | Message timed out");
+    if (timedOut) {
+        em.setDescription(em.description + "\n\n" + createPageIndicator(pages.length, page) + " | Message timed out");
+    } else {
+        em.setDescription(em.description + "\n\n" + createPageIndicator(pages.length, page) + " | Message closed");
+    }
     await interaction.editReply({
         embeds: [em],
-        components: [
-            new MessageActionRow().addComponents([
-                new MessageButton()
-                    .setCustomId("left")
-                    .setEmoji(getEmojiByName("CONTROL.LEFT", "id"))
-                    .setStyle("SECONDARY")
-                    .setDisabled(true),
-                new MessageButton()
-                    .setCustomId("select")
-                    .setEmoji(getEmojiByName("CONTROL.MENU", "id"))
-                    .setStyle("SECONDARY")
-                    .setDisabled(true),
-                new MessageButton()
-                    .setCustomId("right")
-                    .setEmoji(getEmojiByName("CONTROL.RIGHT", "id"))
-                    .setStyle("SECONDARY")
-                    .setDisabled(true),
-                new MessageButton()
-                    .setCustomId("close")
-                    .setEmoji(getEmojiByName("CONTROL.CROSS", "id"))
-                    .setStyle("DANGER")
-                    .setDisabled(true)
-            ])
-        ]
+        components: []
     });
 };
 
diff --git a/src/events/guildBanAdd.ts b/src/events/guildBanAdd.ts
index a05389f..9f4c47a 100644
--- a/src/events/guildBanAdd.ts
+++ b/src/events/guildBanAdd.ts
@@ -1,4 +1,4 @@
-import type { GuildAuditLogsEntry, GuildBan } from 'discord.js';
+import type { GuildAuditLogsEntry, GuildBan } from "discord.js";
 import { purgeByUser } from "../actions/tickets/delete.js";
 import { callback as statsChannelRemove } from "../reflex/statsChannelUpdate.js";
 // @ts-expect-error
diff --git a/src/events/guildBanRemove.ts b/src/events/guildBanRemove.ts
index 86d6efe..5f1499d 100644
--- a/src/events/guildBanRemove.ts
+++ b/src/events/guildBanRemove.ts
@@ -1,4 +1,4 @@
-import type { GuildAuditLogsEntry, GuildBan } from 'discord.js';
+import type { GuildAuditLogsEntry, GuildBan } from "discord.js";
 import { purgeByUser } from "../actions/tickets/delete.js";
 // @ts-expect-error
 import type { HaikuClient } from "jshaiku";
diff --git a/src/events/guildUpdate.ts b/src/events/guildUpdate.ts
index ea9008d..3274727 100644
--- a/src/events/guildUpdate.ts
+++ b/src/events/guildUpdate.ts
@@ -1,6 +1,6 @@
 // @ts-expect-error
 import type { HaikuClient } from "jshaiku";
-import type { Guild, GuildAuditLogsEntry } from 'discord.js';
+import type { Guild, GuildAuditLogsEntry } from "discord.js";
 import { callback as statsChannelUpdate } from "../reflex/statsChannelUpdate.js";
 
 export const event = "guildUpdate";
@@ -31,8 +31,8 @@
         NONE: "None",
         ELEVATED: "Enabled"
     };
-    const beforeOwner = await before.fetchOwner()
-    const afterOwner = await after.fetchOwner()
+    const beforeOwner = await before.fetchOwner();
+    const afterOwner = await after.fetchOwner();
 
     if (before.name !== after.name) list["name"] = entry([before.name, after.name], `${before.name} -> ${after.name}`);
     if (before.icon !== after.icon)
diff --git a/src/events/interactionCreate.ts b/src/events/interactionCreate.ts
index 9ee7bee..a00baf8 100644
--- a/src/events/interactionCreate.ts
+++ b/src/events/interactionCreate.ts
@@ -11,7 +11,7 @@
 
 export const event = "interactionCreate";
 
-function getAutocomplete(typed: string, options: string[]): {name: string, value: string}[] {
+function getAutocomplete(typed: string, options: string[]): { name: string; value: string }[] {
     options = options.filter((option) => option.length <= 100); // thanks discord. 6000 character limit on slash command inputs but only 100 for autocomplete.
     if (!typed)
         return options
@@ -65,8 +65,11 @@
 }
 
 async function interactionCreate(interaction: Interaction) {
-    if (interaction.type === "MESSAGE_COMPONENT" && (interaction as MessageComponentInteraction).componentType === "BUTTON") {
-        const int = (interaction as MessageComponentInteraction)
+    if (
+        interaction.type === "MESSAGE_COMPONENT" &&
+        (interaction as MessageComponentInteraction).componentType === "BUTTON"
+    ) {
+        const int = interaction as MessageComponentInteraction;
         switch (int.customId) {
             case "rolemenu": {
                 return await roleMenu(interaction);
@@ -85,24 +88,16 @@
             }
         }
     } else if (interaction.type === "APPLICATION_COMMAND_AUTOCOMPLETE") {
-        const int = (interaction as AutocompleteInteraction)
-        switch (
-            `${int.commandName} ${int.options.getSubcommandGroup(
-                false
-            )} ${int.options.getSubcommand(false)}`
-        ) {
+        const int = interaction as AutocompleteInteraction;
+        switch (`${int.commandName} ${int.options.getSubcommandGroup(false)} ${int.options.getSubcommand(false)}`) {
             case "tag null null": {
-                return int.respond(
-                    getAutocomplete(int.options.getString("tag") ?? "", await tagAutocomplete(int))
-                );
+                return int.respond(getAutocomplete(int.options.getString("tag") ?? "", await tagAutocomplete(int)));
             }
             case "settings null stats": {
                 return int.respond(generateStatsChannelAutocomplete(int.options.getString("name") ?? ""));
             }
             case "settings null welcome": {
-                return int.respond(
-                    generateWelcomeMessageAutocomplete(int.options.getString("message") ?? "")
-                );
+                return int.respond(generateWelcomeMessageAutocomplete(int.options.getString("message") ?? ""));
             }
         }
     }
diff --git a/src/events/inviteCreate.ts b/src/events/inviteCreate.ts
index fb35b7e..735ec21 100644
--- a/src/events/inviteCreate.ts
+++ b/src/events/inviteCreate.ts
@@ -9,7 +9,9 @@
 export async function callback(client: HaikuClient, invite: Invite) {
     const { getAuditLog, log, NucleusColors, entry, renderUser, renderDelta, renderChannel } = client.logger;
     const auditLog = await getAuditLog(invite.guild, "INVITE_CREATE");
-    const audit = auditLog.entries.filter((entry: GuildAuditLogsEntry) => entry.target!.id === invite.inviterId).first();
+    const audit = auditLog.entries
+        .filter((entry: GuildAuditLogsEntry) => entry.target!.id === invite.inviterId)
+        .first();
     if (audit.executor.id === client.user.id) return;
     const data = {
         meta: {
diff --git a/src/events/inviteDelete.ts b/src/events/inviteDelete.ts
index b07893a..375a693 100644
--- a/src/events/inviteDelete.ts
+++ b/src/events/inviteDelete.ts
@@ -9,7 +9,9 @@
 export async function callback(client: HaikuClient, invite: Invite) {
     const { getAuditLog, log, NucleusColors, entry, renderUser, renderDelta, renderChannel } = client.logger;
     const auditLog = await getAuditLog(invite.guild, "INVITE_DELETE");
-    const audit = auditLog.entries.filter((entry: GuildAuditLogsEntry) => entry.target!.id === invite.inviterId).first();
+    const audit = auditLog.entries
+        .filter((entry: GuildAuditLogsEntry) => entry.target!.id === invite.inviterId)
+        .first();
     if (audit.executor.id === client.user.id) return;
     const data = {
         meta: {
diff --git a/src/events/messageDelete.ts b/src/events/messageDelete.ts
index f2301e0..0527a60 100644
--- a/src/events/messageDelete.ts
+++ b/src/events/messageDelete.ts
@@ -10,7 +10,9 @@
         if (client.noLog.includes(`${message.id}/${message.channel.id}/${message.id}`)) return;
         const { getAuditLog, log, NucleusColors, entry, renderUser, renderDelta, renderChannel } = client.logger;
         const auditLog = await getAuditLog(message.guild, "MEMBER_BAN_ADD");
-        const audit = auditLog.entries.filter((entry: GuildAuditLogsEntry) => entry.target!.id === message.author.id).first();
+        const audit = auditLog.entries
+            .filter((entry: GuildAuditLogsEntry) => entry.target!.id === message.author.id)
+            .first();
         if (audit) {
             if (audit.createdAt - 100 < new Date().getTime()) return;
         }
@@ -54,7 +56,9 @@
                 repliedTo: entry(
                     replyTo,
                     replyTo
-                        ? `[[Jump to message]](https://discord.com/channels/${message.guild!.id}/${message.channel.id}/${replyTo.messageId})`
+                        ? `[[Jump to message]](https://discord.com/channels/${message.guild!.id}/${
+                              message.channel.id
+                          }/${replyTo.messageId})`
                         : "None"
                 )
             },
diff --git a/src/events/stickerCreate.ts b/src/events/stickerCreate.ts
index 01d6c2c..76bb6f1 100644
--- a/src/events/stickerCreate.ts
+++ b/src/events/stickerCreate.ts
@@ -1,5 +1,5 @@
 // @ts-expect-error
-import type { HaikuClient } from "jshaiku"
+import type { HaikuClient } from "jshaiku";
 import type { GuildAuditLogsEntry, Sticker } from "discord.js";
 
 export const event = "stickerDelete";
diff --git a/src/events/stickerDelete.ts b/src/events/stickerDelete.ts
index c9b3fab..18dcc80 100644
--- a/src/events/stickerDelete.ts
+++ b/src/events/stickerDelete.ts
@@ -1,5 +1,5 @@
 // @ts-expect-error
-import type { HaikuClient } from "jshaiku"
+import type { HaikuClient } from "jshaiku";
 import type { GuildAuditLogsEntry, Sticker } from "discord.js";
 
 export const event = "stickerDelete";
diff --git a/src/events/stickerUpdate.ts b/src/events/stickerUpdate.ts
index c6e3b6e..e2ed1f9 100644
--- a/src/events/stickerUpdate.ts
+++ b/src/events/stickerUpdate.ts
@@ -1,5 +1,5 @@
 // @ts-expect-error
-import type { HaikuClient } from "jshaiku"
+import type { HaikuClient } from "jshaiku";
 import type { Sticker } from "discord.js";
 
 export const event = "stickerUpdate";
diff --git a/src/events/threadCreate.ts b/src/events/threadCreate.ts
index e8849c9..5d0be0b 100644
--- a/src/events/threadCreate.ts
+++ b/src/events/threadCreate.ts
@@ -2,7 +2,7 @@
 // @ts-expect-error
 import humanizeDuration from "humanize-duration";
 // @ts-expect-error
-import type { HaikuClient } from "jshaiku"
+import type { HaikuClient } from "jshaiku";
 export const event = "threadCreate";
 
 export async function callback(client: HaikuClient, thread: ThreadChannel) {
@@ -10,10 +10,12 @@
     const auditLog = await getAuditLog(thread.guild, "THREAD_CREATE");
     const audit = auditLog.entries.filter((entry: GuildAuditLogsEntry) => entry.target!.id === thread.id).first();
     if (audit.executor.id === client.user.id) return;
-    const category = thread.parent ? entry(
-        thread.parent.parent ? thread.parent.parent.name : "None",
-        thread.parent.parent ? renderChannel(thread.parent.parent) : "None"
-    ) : entry(null, "Uncategorised")
+    const category = thread.parent
+        ? entry(
+              thread.parent.parent ? thread.parent.parent.name : "None",
+              thread.parent.parent ? renderChannel(thread.parent.parent) : "None"
+          )
+        : entry(null, "Uncategorised");
     const data = {
         meta: {
             type: "channelCreate",
diff --git a/src/events/threadDelete.ts b/src/events/threadDelete.ts
index 1908b7f..fba3007 100644
--- a/src/events/threadDelete.ts
+++ b/src/events/threadDelete.ts
@@ -2,7 +2,7 @@
 // @ts-expect-error
 import humanizeDuration from "humanize-duration";
 // @ts-expect-error
-import type { HaikuClient } from "jshaiku"
+import type { HaikuClient } from "jshaiku";
 export const event = "threadDelete";
 
 export async function callback(client: HaikuClient, thread: ThreadChannel) {
@@ -10,10 +10,12 @@
     const auditLog = await getAuditLog(thread.guild, "THREAD_UPDATE");
     const audit = auditLog.entries.filter((entry: GuildAuditLogsEntry) => entry.target!.id === thread.id).first();
     if (audit.executor.id === client.user.id) return;
-    const category = thread.parent ? entry(
-            thread.parent.parent ? thread.parent.parent.name : "None",
-            thread.parent.parent ? renderChannel(thread.parent.parent) : "None"
-        ) : entry(null, "Uncategorised")
+    const category = thread.parent
+        ? entry(
+              thread.parent.parent ? thread.parent.parent.name : "None",
+              thread.parent.parent ? renderChannel(thread.parent.parent) : "None"
+          )
+        : entry(null, "Uncategorised");
     const data = {
         meta: {
             type: "channelDelete",
diff --git a/src/events/threadUpdate.ts b/src/events/threadUpdate.ts
index 4df2587..0077330 100644
--- a/src/events/threadUpdate.ts
+++ b/src/events/threadUpdate.ts
@@ -32,7 +32,9 @@
     if (before.rateLimitPerUser !== after.rateLimitPerUser) {
         list["slowmode"] = entry(
             [before.rateLimitPerUser, after.rateLimitPerUser],
-            `${humanizeDuration((before.rateLimitPerUser ?? 0) * 1000)} -> ${humanizeDuration((after.rateLimitPerUser ?? 0) * 1000)}`
+            `${humanizeDuration((before.rateLimitPerUser ?? 0) * 1000)} -> ${humanizeDuration(
+                (after.rateLimitPerUser ?? 0) * 1000
+            )}`
         );
     }
     if (!(Object.keys(list).length - 3)) return;
diff --git a/src/events/webhookUpdate.ts b/src/events/webhookUpdate.ts
index c58a340..6187253 100644
--- a/src/events/webhookUpdate.ts
+++ b/src/events/webhookUpdate.ts
@@ -15,25 +15,34 @@
             auditLogUpdate,
             auditLogDelete
         ]);
-        const auditCreate = auditLogCreate.entries.filter((entry: GuildAuditLogsEntry | null) => {
-            if (entry === null) return false
-            return (entry.target! as Webhook).channelId === channel.id}
-        ).first();
-        const auditUpdate = auditLogUpdate.entries.filter((entry: GuildAuditLogsEntry | null) => {
-            if (entry === null) return false
-            return (entry.target! as Webhook).channelId === channel.id}
-        ).first();
-        const auditDelete = auditLogDelete.entries.filter((entry: GuildAuditLogsEntry | null) => {
-            if (entry === null) return false
-            return (entry.target! as Webhook).channelId === channel.id}
-        ).first();
+        const auditCreate = auditLogCreate.entries
+            .filter((entry: GuildAuditLogsEntry | null) => {
+                if (entry === null) return false;
+                return (entry.target! as Webhook).channelId === channel.id;
+            })
+            .first();
+        const auditUpdate = auditLogUpdate.entries
+            .filter((entry: GuildAuditLogsEntry | null) => {
+                if (entry === null) return false;
+                return (entry.target! as Webhook).channelId === channel.id;
+            })
+            .first();
+        const auditDelete = auditLogDelete.entries
+            .filter((entry: GuildAuditLogsEntry | null) => {
+                if (entry === null) return false;
+                return (entry.target! as Webhook).channelId === channel.id;
+            })
+            .first();
         if (!auditCreate && !auditUpdate && !auditDelete) return;
         let audit = auditCreate;
         let action: "Create" | "Update" | "Delete" = "Create";
         let list: Record<string, ReturnType<typeof entry> | string> = {};
         if (auditUpdate && auditUpdate.createdTimestamp > audit.createdTimestamp) {
             const { before, after } = auditUpdate.changes.reduce(
-                (acc: {before: Record<string, string>, after: Record<string, string>}, change: {key: string, new: string, old: string}) => {
+                (
+                    acc: { before: Record<string, string>; after: Record<string, string> },
+                    change: { key: string; new: string; old: string }
+                ) => {
                     acc.before[change.key] = change.old;
                     acc.after[change.key] = change.new;
                     return acc;
@@ -50,14 +59,20 @@
                         renderChannel(await client.channels.fetch(after.channel_id))
                 );
             if (!Object.keys(list).length) return;
-            list["created"] = entry(auditUpdate.target.createdTimestamp, renderDelta(auditUpdate.target.createdTimestamp));
+            list["created"] = entry(
+                auditUpdate.target.createdTimestamp,
+                renderDelta(auditUpdate.target.createdTimestamp)
+            );
             list["edited"] = entry(after.editedTimestamp, renderDelta(new Date().getTime()));
             list["editedBy"] = entry(auditUpdate.executor.id, renderUser(auditUpdate.executor));
             audit = auditUpdate;
             action = "Update";
         } else if (auditDelete && auditDelete.createdTimestamp > audit.createdTimestamp) {
             const { before } = auditDelete.changes.reduce(
-                (acc: {before: Record<string, string>, after: Record<string, string>}, change: {key: string, new: string, old: string}) => {
+                (
+                    acc: { before: Record<string, string>; after: Record<string, string> },
+                    change: { key: string; new: string; old: string }
+                ) => {
                     acc.before[change.key] = change.old;
                     acc.after[change.key] = change.new;
                     return acc;
@@ -78,7 +93,10 @@
             action = "Delete";
         } else {
             const { before } = auditDelete.changes.reduce(
-                (acc: {before: Record<string, string>, after: Record<string, string>}, change: {key: string, new: string, old: string}) => {
+                (
+                    acc: { before: Record<string, string>; after: Record<string, string> },
+                    change: { key: string; new: string; old: string }
+                ) => {
                     acc.before[change.key] = change.old;
                     acc.after[change.key] = change.new;
                     return acc;
diff --git a/src/premium/createTranscript.ts b/src/premium/createTranscript.ts
index 57720bf..97d0d28 100644
--- a/src/premium/createTranscript.ts
+++ b/src/premium/createTranscript.ts
@@ -1,4 +1,12 @@
-import { CommandInteraction, GuildMember, Message, MessageActionRow, MessageButton, MessageComponentInteraction, TextChannel } from "discord.js";
+import {
+    CommandInteraction,
+    GuildMember,
+    Message,
+    MessageActionRow,
+    MessageButton,
+    MessageComponentInteraction,
+    TextChannel
+} from "discord.js";
 import EmojiEmbed from "../utils/generateEmojiEmbed.js";
 import getEmojiByName from "../utils/getEmojiByName.js";
 import { PasteClient, Publicity, ExpireDate } from "pastebin-api";
diff --git a/src/reflex/guide.ts b/src/reflex/guide.ts
index ef7b255..4e7703c 100644
--- a/src/reflex/guide.ts
+++ b/src/reflex/guide.ts
@@ -230,7 +230,9 @@
 
     let selectPaneOpen = false;
 
-    while (true) {
+    let cancelled = false;
+    let timedOut = false;
+    while (!cancelled && !timedOut) {
         let selectPane: MessageActionRow[] = [];
 
         if (selectPaneOpen) {
@@ -297,7 +299,8 @@
                 time: 300000
             });
         } catch (e) {
-            break;
+            timedOut = true;
+            continue;
         }
         i.deferUpdate();
         if (!("customId" in i.component)) {
@@ -314,91 +317,40 @@
             page = parseInt((i as SelectMenuInteraction).values[0]!);
             selectPaneOpen = false;
         } else {
-            if (interaction) {
-                const em = new Discord.MessageEmbed(pages[page]!.embed);
-                em.setDescription(em.description + "\n\n" + createPageIndicator(pages.length, page));
-                em.setFooter({ text: "Message closed" });
-                interaction.editReply({
-                    embeds: [em],
-                    components: [
-                        new MessageActionRow().addComponents([
-                            new MessageButton()
-                                .setCustomId("left")
-                                .setEmoji(getEmojiByName("CONTROL.LEFT", "id"))
-                                .setStyle("SECONDARY")
-                                .setDisabled(true),
-                            new MessageButton()
-                                .setCustomId("select")
-                                .setEmoji(getEmojiByName("CONTROL.MENU", "id"))
-                                .setStyle(selectPaneOpen ? "PRIMARY" : "SECONDARY")
-                                .setDisabled(true),
-                            new MessageButton()
-                                .setCustomId("right")
-                                .setEmoji(getEmojiByName("CONTROL.RIGHT", "id"))
-                                .setStyle("SECONDARY")
-                                .setDisabled(true)
-                        ])
-                    ]
-                });
-            } else {
-                m.delete();
-            }
-            return;
+            cancelled = true;
         }
     }
-    if (interaction) {
-        const em = new Discord.MessageEmbed(pages[page]!.embed);
-        em.setDescription(em.description + "\n\n" + createPageIndicator(pages.length, page)).setFooter({
-            text: "Message timed out"
-        });
-        await interaction.editReply({
-            embeds: [em],
-            components: [
-                new MessageActionRow().addComponents([
-                    new MessageButton()
-                        .setCustomId("left")
-                        .setEmoji(getEmojiByName("CONTROL.LEFT", "id"))
-                        .setStyle("SECONDARY")
-                        .setDisabled(true),
-                    new MessageButton()
-                        .setCustomId("select")
-                        .setEmoji(getEmojiByName("CONTROL.MENU", "id"))
-                        .setStyle("SECONDARY")
-                        .setDisabled(true),
-                    new MessageButton()
-                        .setCustomId("right")
-                        .setEmoji(getEmojiByName("CONTROL.RIGHT", "id"))
-                        .setStyle("SECONDARY")
-                        .setDisabled(true)
-                ])
-            ]
-        });
+    if (timedOut) {
+        if (interaction) {
+            const em = new Discord.MessageEmbed(pages[page]!.embed);
+            em.setDescription(em.description + "\n\n" + createPageIndicator(pages.length, page)).setFooter({
+                text: "Message timed out"
+            });
+            await interaction.editReply({
+                embeds: [em],
+                components: []
+            });
+        } else {
+            const em = new Discord.MessageEmbed(pages[page]!.embed);
+            em.setDescription(em.description + "\n\n" + createPageIndicator(pages.length, page)).setFooter({
+                text: "Message timed out"
+            });
+            await m.edit({
+                embeds: [em],
+                components: []
+            });
+        }
     } else {
-        const em = new Discord.MessageEmbed(pages[page]!.embed);
-        em.setDescription(em.description + "\n\n" + createPageIndicator(pages.length, page)).setFooter({
-            text: "Message timed out"
-        });
-        await m.edit({
-            embeds: [em],
-            components: [
-                new MessageActionRow().addComponents([
-                    new MessageButton()
-                        .setCustomId("left")
-                        .setEmoji(getEmojiByName("CONTROL.LEFT", "id"))
-                        .setStyle("SECONDARY")
-                        .setDisabled(true),
-                    new MessageButton()
-                        .setCustomId("select")
-                        .setEmoji(getEmojiByName("CONTROL.MENU", "id"))
-                        .setStyle("SECONDARY")
-                        .setDisabled(true),
-                    new MessageButton()
-                        .setCustomId("right")
-                        .setEmoji(getEmojiByName("CONTROL.RIGHT", "id"))
-                        .setStyle("SECONDARY")
-                        .setDisabled(true)
-                ])
-            ]
-        });
+        if (interaction) {
+            const em = new Discord.MessageEmbed(pages[page]!.embed);
+            em.setDescription(em.description + "\n\n" + createPageIndicator(pages.length, page));
+            em.setFooter({ text: "Message closed" });
+            interaction.editReply({
+                embeds: [em],
+                components: []
+            });
+        } else {
+            m.delete();
+        }
     }
 };
diff --git a/src/reflex/statsChannelUpdate.ts b/src/reflex/statsChannelUpdate.ts
index 657e90d..850e826 100644
--- a/src/reflex/statsChannelUpdate.ts
+++ b/src/reflex/statsChannelUpdate.ts
@@ -1,4 +1,4 @@
-import type { Guild, User } from 'discord.js';
+import type { Guild, User } from "discord.js";
 // @ts-expect-error
 import type { HaikuClient } from "jshaiku";
 import type { GuildMember } from "discord.js";
@@ -14,7 +14,7 @@
     if (!member && !guild) return;
     guild = await client.guilds.fetch(member ? member.guild.id : guild!.id);
     if (!guild) return;
-    user = user ?? member!.user
+    user = user ?? member!.user;
     const config = await client.database.guilds.read(guild.id);
     Object.entries(config.getKey("stats")).forEach(async ([channel, props]) => {
         if ((props as PropSchema).enabled) {
diff --git a/src/reflex/verify.ts b/src/reflex/verify.ts
index f28b291..8aba46d 100644
--- a/src/reflex/verify.ts
+++ b/src/reflex/verify.ts
@@ -1,5 +1,12 @@
 import { LoadingEmbed } from "./../utils/defaultEmbeds.js";
-import Discord, { CommandInteraction, GuildMember, Interaction, MessageComponentInteraction, Permissions, Role } from "discord.js";
+import Discord, {
+    CommandInteraction,
+    GuildMember,
+    Interaction,
+    MessageComponentInteraction,
+    Permissions,
+    Role
+} from "discord.js";
 import EmojiEmbed from "../utils/generateEmojiEmbed.js";
 import fetch from "node-fetch";
 import { TestString, NSFWCheck } from "./scanners.js";
@@ -175,20 +182,17 @@
     let length = 5;
     let itt = 0;
     const chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
-    while (true) {
+    do {
         itt += 1;
         code = "";
         for (let i = 0; i < length; i++) {
             code += chars.charAt(Math.floor(Math.random() * chars.length));
         }
-        if (code in verify) continue;
         if (itt > 1000) {
             itt = 0;
             length += 1;
-            continue;
         }
-        break;
-    }
+    } while (code in verify);
     const role: Role | null = await interaction.guild!.roles.fetch(config.verify.role);
     if (!role) {
         await interaction.editReply({
diff --git a/src/utils/specialTypes.ts b/src/utils/specialTypes.ts
deleted file mode 100644
index 93264d6..0000000
--- a/src/utils/specialTypes.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-/* eslint-disable @typescript-eslint/no-explicit-any */
-export type AsyncReturnType<T extends (...args: any[]) => Promise<any>> = T extends (...args: any[]) => Promise<infer X>
-    ? X
-    : unknown;
