diff --git a/.eslintignore b/.eslintignore
index d7b2f7f..a753b6e 100644
--- a/.eslintignore
+++ b/.eslintignore
@@ -1 +1,2 @@
-ClicksMigratingProblems/**/*
\ No newline at end of file
+ClicksMigratingProblems/**/*
+src/reflex/nsfwjs/**/*
diff --git a/.eslintrc.json b/.eslintrc.json
index 165e759..7db4826 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -23,6 +23,8 @@
                 "caughtErrorsIgnorePattern": "^_"
             }
         ],
-        "@typescript-eslint/no-explicit-any": "error"
+        "@typescript-eslint/no-explicit-any": "error",
+        "@typescript-eslint/no-misused-promises": "error",
+        "@typescript-eslint/no-floating-promises": "error"
     }
 }
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
index 12384fc..68e5d1f 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.md
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -1,32 +1,29 @@
 ---
 name: Bug report
-about: Something doesn't work how you expect it to
+about: Something didn't work like you expected
 title: "[BUG]"
-labels: ""
+labels: "\U0001F41B Bug"
 assignees: PineaFan
 ---
 
 [Describe the bug in one line, keep it concise]
 
-**To Reproduce**
-Steps to reproduce the behaviour:
+**Command or Feature:**
+The name of the command (e.g. /settings filters) or the feature (e.g. Message edit logs)
 
-1. Go to '...'
-2. Click on '....'
-3. Scroll down to '....'
-4. See an error
+**Steps to reproduce:**
 
-**Expected behaviour**
-A clear and concise description of what you expected to happen.
+1. Run ...
+2. Press ...
 
-**Screenshots**
-If applicable, add screenshots to help explain your problem.
+**Expected behaviour:**
+Explain what you expected to happen in one line
 
-**Desktop (please complete the following information):**
+**Actual behaviour:**
+What was meant to happen?
 
--   OS: [e.g. iOS]
--   Browser [e.g. chrome, safari]
--   Version [e.g. 22]
+**Version:**
+Let us know the date this happened, so we can check if it's already been fixed
 
 **Additional context**
 Add any other context about the problem here.
diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md
index b865782..a8178cb 100644
--- a/.github/ISSUE_TEMPLATE/feature_request.md
+++ b/.github/ISSUE_TEMPLATE/feature_request.md
@@ -2,18 +2,21 @@
 name: Feature request
 about: I want something added to Nucleus
 title: "[FEATURE]"
-labels: ""
+labels: "✓ Feature"
 assignees: PineaFan
 ---
 
-**Is your feature request related to a problem? Please describe.**
-A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
+**Is this related to a bug? If so, briefly explain the bug below**
+N/A
 
-**Describe the solution you'd like**
-A clear and concise description of what you want to happen.
+**What's your idea?**
+A clear and concise description of what you'd like us to add
 
-**Describe alternatives you've considered**
-A clear and concise description of any alternative solutions or features you've considered.
+**How would you like it implemented?**
+List any options you'd like your feature to add here
+
+**How does this help?**
+If it helps with the feature, explain your use case and how this feature helps to solve the problem
 
 **Additional context**
-Add any other context or screenshots about the feature request here.
+Add any other context about the feature request
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index c1da375..325f0d8 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -22,6 +22,8 @@
               with:
                   node-version: 19.x
             - run: yarn install --immutable
+            - name: Show versions
+              run: yarn run versions
             - name: Compile
               run: yarn build
             - name: Run prettier and eslint
diff --git a/.gitignore b/.gitignore
index d73f2ea..9eaba59 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,7 +6,7 @@
 !src/config/*.d.ts
 !src/config/format.ts
 !src/config/default.ts
-!src/config/emojis.json
+!src/config/emojis.ts
 src/utils/migration/data
 src/config/main.ts
 .vscode/
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..da4b2df
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,4 @@
+[submodule "src/reflex/nsfwjs"]
+	path = src/reflex/nsfwjs
+	url = https://github.com/infinitered/nsfwjs
+	shallow = true
diff --git a/.prettierignore b/.prettierignore
index 6deb598..1d61cc6 100644
--- a/.prettierignore
+++ b/.prettierignore
@@ -21,3 +21,4 @@
 ClicksMigratingProblems/oldData copy/
 
 .direnv/
+src/reflex/nsfwjs/**/*
diff --git a/flake.nix b/flake.nix
index c11ea5f..bdbd76c 100644
--- a/flake.nix
+++ b/flake.nix
@@ -8,7 +8,7 @@
       pkgs = nixpkgs.legacyPackages.${system};
     in {
       devShells.default = pkgs.mkShell {
-        packages = [ pkgs.yarn pkgs.nodejs-19_x pkgs.typescript pkgs.act ];
+        packages = [ pkgs.nodejs-19_x pkgs.nodePackages_latest.yarn ];
       };
     });
 }
diff --git a/package.json b/package.json
index 629c6dd..2ff313c 100644
--- a/package.json
+++ b/package.json
@@ -1,20 +1,24 @@
 {
     "dependencies": {
         "@hokify/agenda": "^6.2.12",
+        "@octokit/graphql": "^5.0.5",
         "@tensorflow/tfjs": "^3.18.0",
-        "@tensorflow/tfjs-node": "^4.2.0",
+        "@tensorflow/tfjs-node": "^3.18.0",
         "@total-typescript/ts-reset": "^0.3.7",
         "@tsconfig/node18-strictest-esm": "^1.0.0",
+        "@types/gm": "^1.25.0",
         "@types/node": "^18.14.6",
         "@ungap/structured-clone": "^1.0.1",
         "agenda": "^4.3.0",
         "body-parser": "^1.20.0",
         "canvas": "^2.11.0",
         "clamscan": "^2.1.2",
-        "discord.js": "^14.7.1",
+        "discord.js": "^14.8.0",
         "eslint": "^8.21.0",
         "express": "^4.18.1",
         "fuse.js": "^6.6.2",
+        "gifencoder": "^2.0.1",
+        "gm": "^1.25.0",
         "humanize-duration": "^3.27.1",
         "immutable": "^4.1.0",
         "lodash": "^4.17.21",
@@ -22,26 +26,34 @@
         "node-fetch": "^3.3.0",
         "node-tesseract-ocr": "^2.2.1",
         "nsfwjs": "^2.4.2",
+        "octokit": "^2.0.14",
         "seedrandom": "^3.0.5",
         "structured-clone": "^0.2.2",
         "systeminformation": "^5.17.3"
     },
+    "resolutions": {
+        "discord-api-types": "0.37.23"
+    },
     "name": "nucleus",
     "version": "0.0.1",
     "description": "Nucleus: The core of your server",
     "main": "dist/index.js",
     "scripts": {
-        "build": "tsc",
+        "build": "tsc && yarn copy-files",
+        "copy-files": "copyfiles -u 1 src/reflex/nsfwjs/example/nsfw_demo/public/model/**/* dist/",
         "start": "node --experimental-json-modules --enable-source-maps dist/index.js",
-        "dev": "rm -rf dist && eslint src --fix && tsc && node --experimental-json-modules --enable-source-maps dist/index.js",
-        "force-dev": "clear; rm -rf dist; tsc-suppress && node --experimental-json-modules --enable-source-maps dist/index.js",
+        "dev": "rm -rf dist && eslint src --fix && yarn build && node --experimental-json-modules --enable-source-maps dist/index.js",
+        "force-dev": "clear; rm -rf dist; tsc-suppress && yarn copy-files && 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-no-stylecheck": "echo 'Linting...'; eslint src; echo 'A full lint and style check is required for PRs to be accepted. Please run `yarn lint` before committing'; 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",
         "lint-ci": "echo 'Style checking...' && prettier --check . && echo 'Linting...' && eslint src",
         "setup": "node Installer.js",
-        "win-force-build": "clear | rm -r dist | tsc-suppress",
-        "audit-fix": "yarn-audit-fix"
+        "win-force-build": "clear | rm -r dist | tsc-suppress | yarn copy-files",
+        "audit-fix": "yarn-audit-fix",
+        "versions": "yarn versions && yarn list && node --version",
+        "win-lint-fix": "echo 'Fixing eslint issues...' | eslint src --fix | echo 'Reformatting...' | prettier --write --loglevel warn --cache . | true"
     },
     "repository": {
         "type": "git",
@@ -61,9 +73,11 @@
     "type": "module",
     "devDependencies": {
         "@types/clamscan": "^2.0.4",
+        "@types/gifencoder": "^2.0.1",
         "@types/lodash": "^4.14.191",
         "@typescript-eslint/eslint-plugin": "^5.32.0",
         "@typescript-eslint/parser": "^5.32.0",
+        "copyfiles": "^2.4.1",
         "eslint-config-prettier": "^8.5.0",
         "prettier": "^2.7.1",
         "prettier-eslint": "^15.0.1",
diff --git a/src/Unfinished/categorizationTest.ts b/src/Unfinished/categorizationTest.ts
index 763669c..dfe9098 100644
--- a/src/Unfinished/categorizationTest.ts
+++ b/src/Unfinished/categorizationTest.ts
@@ -51,7 +51,6 @@
         let channel: string | GuildChannel;
         if (typeof c === "string") channel = interaction.guild!.channels.cache.get(c as string)!.id;
         else channel = (c[0] as unknown as GuildChannel).id;
-        console.log(channel);
         if (!predicted[channel]) predicted[channel] = [];
         m = await interaction.editReply({
             embeds: [
@@ -139,7 +138,6 @@
         }
         categorized[channel] = selected;
     }
-    console.log(categorized);
 };
 
 const check = () => {
diff --git a/src/actions/createModActionTicket.ts b/src/actions/createModActionTicket.ts
index ea85255..6b34739 100644
--- a/src/actions/createModActionTicket.ts
+++ b/src/actions/createModActionTicket.ts
@@ -115,8 +115,8 @@
             type: Discord.ChannelType.PrivateThread,
             reason: "Creating ticket"
         })) as Discord.PrivateThreadChannel;
-        c.members.add(user.id);
-        c.members.add(createdBy.id);
+        await c.members.add(user.id);
+        await c.members.add(createdBy.id);
         try {
             await c.send({
                 content:
@@ -174,7 +174,7 @@
             guild: guild.id
         }
     };
-    log(data);
+    await log(data);
     return c.id;
 }
 
diff --git a/src/actions/roleMenu.ts b/src/actions/roleMenu.ts
index 9796b28..6997393 100644
--- a/src/actions/roleMenu.ts
+++ b/src/actions/roleMenu.ts
@@ -175,7 +175,7 @@
                 console.log(e);
                 return;
             }
-            component.deferUpdate();
+            await component.deferUpdate();
         }
     }
 
@@ -246,7 +246,7 @@
             console.log(e);
             return;
         }
-        component.deferUpdate();
+        await component.deferUpdate();
         if (component.customId === "back") {
             page = Math.max(0, page - 1);
         } else if (component.customId === "next") {
diff --git a/src/actions/tickets/create.ts b/src/actions/tickets/create.ts
index 26236d8..8dafe52 100644
--- a/src/actions/tickets/create.ts
+++ b/src/actions/tickets/create.ts
@@ -155,7 +155,7 @@
                 new ActionRowBuilder<ButtonBuilder>().addComponents(formattedTicketTypes.slice(i, i + 5))
             );
         }
-        component.update({
+        await component.update({
             embeds: [
                 new EmojiEmbed()
                     .setTitle("Create Ticket")
@@ -280,7 +280,7 @@
             type: Discord.ChannelType.PrivateThread,
             reason: "Creating ticket"
         })) as Discord.PrivateThreadChannel;
-        c.members.add(interaction.member!.user.id);
+        await c.members.add(interaction.member!.user.id);
         try {
             await c.send({
                 content:
@@ -357,7 +357,7 @@
             guild: interaction.guild.id
         }
     };
-    log(data);
+    await log(data);
     await interaction.editReply({
         embeds: [
             new EmojiEmbed()
diff --git a/src/actions/tickets/delete.ts b/src/actions/tickets/delete.ts
index 1c1e464..769bc32 100644
--- a/src/actions/tickets/delete.ts
+++ b/src/actions/tickets/delete.ts
@@ -78,7 +78,7 @@
                 guild: interaction.guild.id
             }
         };
-        log(data);
+        await log(data);
 
         await channel.delete();
     } else if (status === "Active") {
@@ -86,12 +86,12 @@
         // Archive the ticket
         await interaction.channel.fetch();
         if (channel.isThread()) {
-            channel.setName(`${channel.name.replace("Active", "Archived")}`);
-            channel.members.remove(channel.name.split(" - ")[1]!);
+            await channel.setName(`${channel.name.replace("Active", "Archived")}`);
+            await channel.members.remove(channel.name.split(" - ")[1]!);
         } else {
-            channel.setTopic(`${(channel.topic ?? "").replace("Active", "Archived")}`);
+            await channel.setTopic(`${(channel.topic ?? "").replace("Active", "Archived")}`);
             if (!channel.topic!.includes("Archived")) {
-                channel.setTopic("0 Archived");
+                await channel.setTopic("0 Archived");
             }
             await channel.permissionOverwrites.delete(channel.topic!.split(" ")[0]!);
         }
@@ -153,7 +153,7 @@
                 guild: interaction.guild.id
             }
         };
-        log(data);
+        await log(data);
     }
     return;
 }
@@ -170,28 +170,28 @@
     if (tickets.type === Discord.ChannelType.GuildCategory) {
         // For channels, the topic is the user ID, then the word Active
         const category = tickets as Discord.CategoryChannel;
-        category.children.cache.forEach((element) => {
+        for (const [_id, element] of category.children.cache) {
             if (!(element.type === Discord.ChannelType.GuildText)) return;
             if (!((element as Discord.TextChannel).topic ?? "").includes(member)) return;
             try {
-                element.delete();
+                await element.delete();
                 deleted++;
             } catch (e) {
                 console.error(e);
             }
-        });
+        }
     } else {
         // For threads, the name is the users name, id, then the word Active
         const channel = tickets as Discord.TextChannel;
-        channel.threads.cache.forEach((element: Discord.ThreadChannel) => {
+        for (const [_id, element] of channel.threads.cache) {
             if (!element.name.includes(member)) return;
             try {
-                element.delete();
+                await element.delete();
                 deleted++;
             } catch (e) {
                 console.error(e);
             }
-        });
+        }
     }
     if (!deleted) return;
     const { log, NucleusColors, entry, renderUser, renderDelta } = client.logger;
@@ -214,7 +214,7 @@
             guild: guild
         }
     };
-    log(data);
+    await log(data);
 }
 
 export { purgeByUser };
diff --git a/src/api/index.ts b/src/api/index.ts
index 4b849f1..41f281d 100644
--- a/src/api/index.ts
+++ b/src/api/index.ts
@@ -35,7 +35,7 @@
             await member.roles.add(client.verify[code]!.rID);
 
             const interaction = client.verify[code]!.interaction;
-            interaction.editReply({
+            await interaction.editReply({
                 embeds: [
                     new EmojiEmbed()
                         .setTitle("Verify")
@@ -70,7 +70,7 @@
                         guild: guild.id
                     }
                 };
-                log(data);
+                await log(data);
             } catch {
                 res.sendStatus(500);
             }
@@ -80,12 +80,12 @@
         }
     });
 
-    app.get("/verify/:code", jsonParser, function (req: express.Request, res: express.Response) {
+    app.get("/verify/:code", jsonParser, async function (req: express.Request, res: express.Response) {
         const code = req.params.code;
         if (client.verify[code]) {
             try {
                 const interaction = client.verify[code]!.interaction;
-                interaction.editReply({
+                await interaction.editReply({
                     embeds: [
                         new EmojiEmbed()
                             .setTitle("Verify")
@@ -124,12 +124,12 @@
         }
     });
 
-    app.get("/rolemenu/:code", jsonParser, function (req: express.Request, res: express.Response) {
+    app.get("/rolemenu/:code", jsonParser, async function (req: express.Request, res: express.Response) {
         const code = req.params.code;
         if (client.roleMenu[code] !== undefined) {
             try {
                 const interaction = client.roleMenu[code]!.interaction;
-                interaction.editReply({
+                await interaction.editReply({
                     embeds: [
                         new EmojiEmbed()
                             .setTitle("Roles")
diff --git a/src/commands/help.ts b/src/commands/help.ts
index 482bca2..f95eb6e 100644
--- a/src/commands/help.ts
+++ b/src/commands/help.ts
@@ -22,7 +22,10 @@
 import { getCommandByName, getCommandMentionByName } from "../utils/getCommandDataByName.js";
 import getEmojiByName from "../utils/getEmojiByName.js";
 
-const command = new SlashCommandBuilder().setName("help").setDescription("Shows help for commands");
+const command = new SlashCommandBuilder()
+    .setName("help")
+    .setDescription("Shows help for commands")
+    .setDMPermission(true);
 
 const styles: Record<string, { emoji: string }> = {
     help: { emoji: "NUCLEUS.LOGO" },
@@ -127,23 +130,23 @@
                 );
             }
             for (const option of options) {
-                optionString += `> ${option.name} (${ApplicationCommandOptionType[option.type]})- ${
-                    option.description
-                }\n`;
+                optionString += ` - \`${option.name}\` (${ApplicationCommandOptionType[option.type]
+                    .replace("Integer", "Number")
+                    .replace("String", "Text")}) - ${option.description}\n`;
             }
             const APICommand =
                 client.commands[
                     "commands/" + currentPath.filter((value) => value !== "" && value !== "none").join("/")
                 ]![0];
             let allowedToRun = true;
-            if (APICommand?.check) {
+            if (interaction.guild && APICommand?.check) {
                 allowedToRun = await APICommand.check(interaction as Interaction, true);
             }
             embed.setDescription(
-                `${getEmojiByName(styles[currentPath[0]]!.emoji)} **${capitalize(currentData.name)}**\n> ${
+                `${getEmojiByName(styles[currentPath[0]]!.emoji)} **${capitalize(currentData.name)}** | ${
                     currentData.mention
                 }\n\n` +
-                    `> ${currentData.description}\n\n` +
+                    `${currentData.description}\n\n` +
                     (APICommand
                         ? `${getEmojiByName(allowedToRun ? "CONTROL.TICK" : "CONTROL.CROSS")} You ${
                               allowedToRun ? "" : "don't "
diff --git a/src/commands/mod/about.ts b/src/commands/mod/about.ts
index 8736054..6f8b74c 100644
--- a/src/commands/mod/about.ts
+++ b/src/commands/mod/about.ts
@@ -266,7 +266,7 @@
                 }
             });
         } catch (e) {
-            interaction.editReply({
+            await interaction.editReply({
                 embeds: [
                     new EmojiEmbed()
                         .setEmoji("MEMBER.JOIN")
diff --git a/src/commands/mod/ban.ts b/src/commands/mod/ban.ts
index 91e074d..78f936c 100644
--- a/src/commands/mod/ban.ts
+++ b/src/commands/mod/ban.ts
@@ -126,7 +126,7 @@
         dmSent = false;
     }
     try {
-        member.ban({
+        await member.ban({
             deleteMessageSeconds: deleteDays * 24 * 60 * 60,
             reason: reason ?? "*No reason provided*"
         });
@@ -159,7 +159,7 @@
                 guild: interaction.guild.id
             }
         };
-        log(data);
+        await log(data);
     } catch {
         await interaction.editReply({
             embeds: [
@@ -191,7 +191,10 @@
     if (!interaction.guild) return;
     const member = interaction.member as GuildMember;
     // Check if the user has ban_members permission
-    if (!member.permissions.has("BanMembers")) return "You do not have the *Ban Members* permission";
+    if (!member.permissions.has("BanMembers")) {
+        // if(!partial) client.logger.warn("Missing permissions", "Ban", "User does not have Ban Members permission");
+        return "You do not have the *Ban Members* permission";
+    }
     if (partial) return true;
     const me = interaction.guild.members.me!;
     let apply: GuildMember;
diff --git a/src/commands/mod/kick.ts b/src/commands/mod/kick.ts
index 4ef78c8..f9242fe 100644
--- a/src/commands/mod/kick.ts
+++ b/src/commands/mod/kick.ts
@@ -114,7 +114,7 @@
         dmSent = false;
     }
     try {
-        member.kick(reason || "No reason provided");
+        await member.kick(reason || "No reason provided");
         await client.database.history.create("kick", interaction.guild.id, member.user, interaction.user, reason);
         const { log, NucleusColors, entry, renderUser, renderDelta } = client.logger;
         const timeInServer = member.joinedTimestamp
@@ -157,7 +157,7 @@
             data.list.joined = entry(member.joinedTimestamp.toString(), renderDelta(member.joinedTimestamp));
         }
         await client.database.history.create("kick", interaction.guild.id, member.user, interaction.user, reason);
-        log(data);
+        await log(data);
     } catch {
         await interaction.editReply({
             embeds: [
diff --git a/src/commands/mod/mute.ts b/src/commands/mod/mute.ts
index 2266a1a..0cfe660 100644
--- a/src/commands/mod/mute.ts
+++ b/src/commands/mod/mute.ts
@@ -132,7 +132,7 @@
         } catch {
             return;
         }
-        component.deferUpdate();
+        await component.deferUpdate();
         if (component.customId === "cancel")
             return interaction.editReply({
                 embeds: [
@@ -389,7 +389,7 @@
             guild: interaction.guild.id
         }
     };
-    log(data);
+    await log(data);
     const failed = !status.dm && notify;
     await interaction.editReply({
         embeds: [
diff --git a/src/commands/mod/nick.ts b/src/commands/mod/nick.ts
index cfdcf47..178246a 100644
--- a/src/commands/mod/nick.ts
+++ b/src/commands/mod/nick.ts
@@ -81,7 +81,7 @@
                 "Change nickname",
                 "ICONS.EDIT",
                 "modal",
-                newNickname ?? "",
+                { default: newNickname ?? "" },
                 new ModalBuilder().setTitle("Editing nickname").addComponents(
                     new ActionRowBuilder<TextInputBuilder>().addComponents(
                         new TextInputBuilder()
@@ -103,7 +103,7 @@
             notify = confirmation.components["notify"]!.active;
             createAppealTicket = confirmation.components["appeal"]!.active;
         }
-        if (confirmation.modals) newNickname = confirmation.modals![0]!.value;
+        if (confirmation.modals) newNickname = confirmation.modals![0]!.values["default"];
     } while (!timedOut && !success);
     if (timedOut || !success) return;
     let dmSent = false;
@@ -153,7 +153,7 @@
     let before: string | null;
     try {
         before = member.nickname;
-        member.setNickname(newNickname ?? null, "Nucleus Nickname command");
+        await member.setNickname(newNickname ?? null, "Nucleus Nickname command");
         await client.database.history.create(
             "nickname",
             interaction.guild!.id,
@@ -202,7 +202,7 @@
             guild: interaction.guild!.id
         }
     };
-    log(data);
+    await log(data);
     const failed = !dmSent && notify;
     await interaction.editReply({
         embeds: [
@@ -222,7 +222,7 @@
     });
 };
 
-const check = async (interaction: CommandInteraction | ButtonInteraction, partial: boolean, target?: GuildMember) => {
+const check = (interaction: CommandInteraction | ButtonInteraction, partial: boolean, target?: GuildMember) => {
     const member = interaction.member as GuildMember;
     // Check if the user has manage_nicknames permission
     if (!member.permissions.has("ManageNicknames")) return "You do not have the *Manage Nicknames* permission";
diff --git a/src/commands/mod/purge.ts b/src/commands/mod/purge.ts
index dadab04..1170c33 100644
--- a/src/commands/mod/purge.ts
+++ b/src/commands/mod/purge.ts
@@ -100,7 +100,7 @@
             })) as Discord.Message;
             let component;
             try {
-                component = m.awaitMessageComponent({
+                component = await m.awaitMessageComponent({
                     filter: (i) => i.user.id === interaction.user.id && i.channel!.id === interaction.channel!.id,
                     time: 300000
                 });
@@ -108,12 +108,12 @@
                 timedOut = true;
                 continue;
             }
-            (await component).deferUpdate();
-            if ((await component).customId === "done") {
+            await component.deferUpdate();
+            if (component.customId === "done") {
                 amountSelected = true;
                 continue;
             }
-            const amount = parseInt((await component).customId);
+            const amount = parseInt(component.customId);
 
             let messages: Discord.Message[] = [];
             await (interaction.channel as TextChannel).messages.fetch({ limit: amount }).then(async (ms) => {
@@ -167,7 +167,7 @@
                 guild: interaction.guild.id
             }
         };
-        log(data);
+        await log(data);
         const newOut = await client.database.transcripts.createTranscript(
             "purge",
             deleted,
@@ -209,7 +209,7 @@
             return;
         }
         if (component.customId === "download") {
-            interaction.editReply({
+            await interaction.editReply({
                 embeds: [
                     new EmojiEmbed()
                         .setEmoji("CHANNEL.PURGE.GREEN")
@@ -221,7 +221,7 @@
                 files: [attachmentObject]
             });
         } else {
-            interaction.editReply({
+            await interaction.editReply({
                 embeds: [
                     new EmojiEmbed()
                         .setEmoji("CHANNEL.PURGE.GREEN")
@@ -261,12 +261,12 @@
                 messages = await (channel as TextChannel).bulkDelete(toDelete, true);
             } else {
                 const toDelete = (
-                    await (
-                        await (interaction.channel as TextChannel).messages.fetch({
-                            limit: 100
-                        })
-                    ).filter((m) => m.author.id === user.id)
-                ).first(interaction.options.get("amount")?.value as number);
+                    await (interaction.channel as TextChannel).messages.fetch({
+                        limit: 100
+                    })
+                )
+                    .filter((m) => m.author.id === user.id)
+                    .first(interaction.options.get("amount")?.value as number);
                 messages = await (channel as TextChannel).bulkDelete(toDelete, true);
             }
         } catch (e) {
@@ -326,7 +326,7 @@
                 guild: interaction.guild.id
             }
         };
-        log(data);
+        await log(data);
         const messageArray: Message[] = messages
             .filter(
                 (message) =>
diff --git a/src/commands/mod/slowmode.ts b/src/commands/mod/slowmode.ts
index ba88c00..8fe9f16 100644
--- a/src/commands/mod/slowmode.ts
+++ b/src/commands/mod/slowmode.ts
@@ -51,7 +51,7 @@
         .send();
     if (confirmation.cancelled || !confirmation.success) return;
     try {
-        (interaction.channel as TextChannel).setRateLimitPerUser(time);
+        await (interaction.channel as TextChannel).setRateLimitPerUser(time);
     } catch (e) {
         await interaction.editReply({
             embeds: [
diff --git a/src/commands/mod/softban.ts b/src/commands/mod/softban.ts
index cd03d1a..984bb6b 100644
--- a/src/commands/mod/softban.ts
+++ b/src/commands/mod/softban.ts
@@ -128,7 +128,7 @@
     try {
         const member = interaction.options.getMember("user") as GuildMember;
         const days: number = (interaction.options.get("delete")?.value as number | null) ?? 0;
-        member.ban({
+        await member.ban({
             deleteMessageSeconds: days * 24 * 60 * 60,
             reason: reason ?? "*No reason provided*"
         });
@@ -162,7 +162,7 @@
                 guild: interaction.guild.id
             }
         };
-        log(data);
+        await log(data);
     } catch {
         await interaction.editReply({
             embeds: [
diff --git a/src/commands/mod/unban.ts b/src/commands/mod/unban.ts
index 7397414..1c1a877 100644
--- a/src/commands/mod/unban.ts
+++ b/src/commands/mod/unban.ts
@@ -76,7 +76,7 @@
                     guild: interaction.guild.id
                 }
             };
-            log(data);
+            await log(data);
         } catch {
             await interaction.editReply({
                 embeds: [
diff --git a/src/commands/mod/unmute.ts b/src/commands/mod/unmute.ts
index f248a3b..516bd39 100644
--- a/src/commands/mod/unmute.ts
+++ b/src/commands/mod/unmute.ts
@@ -76,7 +76,7 @@
     }
     const member = interaction.options.getMember("user") as GuildMember;
     try {
-        member.timeout(0, reason ?? "*No reason provided*");
+        await member.timeout(0, reason ?? "*No reason provided*");
     } catch {
         await interaction.editReply({
             embeds: [
@@ -122,7 +122,7 @@
             guild: interaction.guild.id
         }
     };
-    log(data);
+    await log(data);
     const failed = !dmSent && notify;
     await interaction.editReply({
         embeds: [
diff --git a/src/commands/mod/warn.ts b/src/commands/mod/warn.ts
index 232219b..0424d48 100644
--- a/src/commands/mod/warn.ts
+++ b/src/commands/mod/warn.ts
@@ -153,7 +153,7 @@
         }
     };
     await client.database.history.create("warn", interaction.guild.id, member.user, interaction.user, reason);
-    log(data);
+    await log(data);
     const failed = !dmSent && notify;
     if (!failed) {
         await interaction.editReply({
diff --git a/src/commands/nucleus/guide.ts b/src/commands/nucleus/guide.ts
index d05e265..c95e78c 100644
--- a/src/commands/nucleus/guide.ts
+++ b/src/commands/nucleus/guide.ts
@@ -6,7 +6,7 @@
     builder.setName("guide").setDescription("Shows the welcome guide for the bot");
 
 const callback = async (interaction: CommandInteraction) => {
-    guide(interaction.guild!, interaction);
+    await guide(interaction.guild!, interaction);
 };
 
 export { command };
diff --git a/src/commands/nucleus/invite.ts b/src/commands/nucleus/invite.ts
index 9f78cc5..0307c68 100644
--- a/src/commands/nucleus/invite.ts
+++ b/src/commands/nucleus/invite.ts
@@ -7,7 +7,7 @@
     builder.setName("invite").setDescription("Invites Nucleus to your server");
 
 const callback = async (interaction: CommandInteraction): Promise<void> => {
-    interaction.reply({
+    await interaction.reply({
         embeds: [
             new EmojiEmbed()
                 .setTitle("Invite")
diff --git a/src/commands/nucleus/ping.ts b/src/commands/nucleus/ping.ts
index 62988bb..8a9ca87 100644
--- a/src/commands/nucleus/ping.ts
+++ b/src/commands/nucleus/ping.ts
@@ -13,7 +13,7 @@
     const initial = Date.now();
     await interaction.reply({ embeds: LoadingEmbed, ephemeral: true });
     const ping = Date.now() - initial;
-    interaction.editReply({
+    await interaction.editReply({
         embeds: [
             new EmojiEmbed()
                 .setTitle("Ping")
diff --git a/src/commands/nucleus/premium.ts b/src/commands/nucleus/premium.ts
index 4effb23..fed2964 100644
--- a/src/commands/nucleus/premium.ts
+++ b/src/commands/nucleus/premium.ts
@@ -93,8 +93,7 @@
         if (i.isButton()) {
             closed = true;
         } else {
-            const response = await client.database.premium.removePremium(interaction.user.id, i.values[0]!);
-            console.log(response);
+            await client.database.premium.removePremium(interaction.user.id, i.values[0]!);
         }
     } while (!closed);
     await interaction.deleteReply();
@@ -106,7 +105,7 @@
     const member = await (await interaction.client.guilds.fetch("684492926528651336")).members
         .fetch(interaction.user.id)
         .catch(() => {
-            interaction.editReply({
+            void interaction.editReply({
                 embeds: [
                     new EmojiEmbed()
                         .setTitle("Premium")
@@ -197,7 +196,7 @@
     if ((dbMember?.appliesTo.length ?? 0) > 0)
         userPremiumServers = "\nIf you want to remove premium from a server, run this command in your DMs with me.";
 
-    interaction.editReply({
+    await interaction.editReply({
         embeds: [
             new EmojiEmbed()
                 .setTitle("Premium")
@@ -216,10 +215,10 @@
     } catch (e) {
         return;
     }
-    i.deferUpdate();
+    await i.deferUpdate();
     const guild = i.guild!;
     if (count - appliesTo.length <= 0) {
-        interaction.editReply({
+        await interaction.editReply({
             embeds: [
                 new EmojiEmbed()
                     .setTitle("Premium")
@@ -235,7 +234,7 @@
         });
     } else {
         await client.database.premium.addPremium(interaction.user.id, guild.id);
-        interaction.editReply({
+        await interaction.editReply({
             embeds: [
                 new EmojiEmbed()
                     .setTitle("Premium")
diff --git a/src/commands/nucleus/stats.ts b/src/commands/nucleus/stats.ts
index 294ee27..d6577e7 100644
--- a/src/commands/nucleus/stats.ts
+++ b/src/commands/nucleus/stats.ts
@@ -8,6 +8,7 @@
     CommandInteraction,
     ComponentType,
     Guild,
+    GuildTextBasedChannel,
     ModalBuilder,
     ModalSubmitInteraction,
     TextInputBuilder,
@@ -21,6 +22,52 @@
 const command = (builder: SlashCommandSubcommandBuilder) =>
     builder.setName("stats").setDescription("Gets the bot's stats");
 
+const confirm = async (interaction: ButtonInteraction) => {
+    const requiredTexts = [
+        "just do it",
+        "yes, do as i say!",
+        "clicksminuteper/nucleus",
+        "i've said it once i'll say it again",
+        "no, i've changed my mind",
+        "this incident will be reported",
+        "coded told me to",
+        "mini told me to",
+        "pinea told me to",
+        "what's a java script",
+        "it's a feature not a bug",
+        "that never happened during testing"
+    ];
+    const chosen = requiredTexts[Math.floor(Math.random() * (requiredTexts.length - 1))]!;
+
+    const modal = new ModalBuilder()
+        .addComponents(
+            new ActionRowBuilder<TextInputBuilder>().addComponents(
+                new TextInputBuilder()
+                    .setStyle(TextInputStyle.Short)
+                    .setLabel(`Type "${chosen}" below`)
+                    .setCustomId("confirm")
+                    .setPlaceholder("Guild ID")
+                    .setMinLength(chosen.length)
+                    .setMaxLength(chosen.length)
+            )
+        )
+        .setTitle("Admin Panel")
+        .setCustomId("adminPanel");
+    await interaction.showModal(modal);
+    let out: ModalSubmitInteraction;
+    try {
+        out = await interaction.awaitModalSubmit({
+            filter: (i) => i.customId === "adminPanel" && i.user.id === interaction.user.id,
+            time: 300000
+        });
+    } catch {
+        return;
+    }
+    await out.deferUpdate();
+    const typed = out.fields.getTextInputValue("confirm");
+    return typed.toLowerCase() === chosen.toLowerCase();
+};
+
 const callback = async (interaction: CommandInteraction): Promise<void> => {
     const description = `**Servers:** ${client.guilds.cache.size}\n` + `**Ping:** \`${client.ws.ping * 2}ms\``;
     const m = await interaction.reply({
@@ -35,7 +82,7 @@
         fetchReply: true
     });
     if (config.owners.includes(interaction.user.id)) {
-        interaction.editReply({
+        await interaction.editReply({
             embeds: [
                 new EmojiEmbed()
                     .setTitle("Admin")
@@ -47,9 +94,9 @@
                 new ActionRowBuilder<ButtonBuilder>().addComponents(
                     new ButtonBuilder().setCustomId("admin").setLabel("Admin Panel").setStyle(ButtonStyle.Primary),
                     new ButtonBuilder()
-                        .setCustomId("mod:nickname:599498449733550102")
-                        .setLabel("Testing")
-                        .setStyle(ButtonStyle.Primary)
+                        .setCustomId("announce")
+                        .setLabel("Announce to all Guilds")
+                        .setStyle(ButtonStyle.Danger)
                 )
             ]
         });
@@ -77,134 +124,281 @@
             return;
         // console.log(interaction)
         if (!("awaitMessageComponent" in channel)) return;
+        let GuildID = interaction.guildId;
         try {
-            i1 = await channel!.awaitMessageComponent<ComponentType.Button>({
-                filter: (i) => i.customId === "admin" && i.user.id === interaction.user.id,
+            i1 = await m.awaitMessageComponent<ComponentType.Button>({
+                filter: (i) => i.user.id === interaction.user.id,
                 time: 300000
             });
         } catch (e) {
             console.log(e);
             return;
         }
-        await i1.showModal(modal);
-        let out: ModalSubmitInteraction;
-        try {
-            out = await i1.awaitModalSubmit({
-                filter: (i) => i.customId === "adminPanel" && i.user.id === interaction.user.id,
-                time: 300000
-            });
-        } catch {
-            return;
-        }
-        out.deferUpdate();
-        const GuildID = out.fields.getTextInputValue("guildID");
-        if (!client.guilds.cache.has(GuildID)) {
-            await interaction.editReply({
-                embeds: [new EmojiEmbed().setTitle("Admin").setDescription("Not in server").setStatus("Danger")],
-                components: []
-            });
-        }
+        switch (i1.customId) {
+            case "admin": {
+                if (!GuildID) {
+                    await i1.showModal(modal);
+                    let out: ModalSubmitInteraction;
+                    try {
+                        out = await i1.awaitModalSubmit({
+                            filter: (i) => i.customId === "adminPanel" && i.user.id === interaction.user.id,
+                            time: 300000
+                        });
+                    } catch {
+                        return;
+                    }
+                    await out.deferUpdate();
+                    GuildID = out.fields.getTextInputValue("guildID");
+                } else if (!client.guilds.cache.has(GuildID)) {
+                    await interaction.editReply({
+                        embeds: [
+                            new EmojiEmbed().setTitle("Admin").setDescription("Not in server").setStatus("Danger")
+                        ],
+                        components: []
+                    });
+                }
 
-        await interaction.editReply({
-            embeds: [],
-            components: [
-                new ActionRowBuilder<ButtonBuilder>().addComponents(
-                    new ButtonBuilder().setCustomId("stats").setLabel("Stats").setStyle(ButtonStyle.Primary),
-                    new ButtonBuilder().setCustomId("leave").setLabel("Leave").setStyle(ButtonStyle.Danger),
-                    new ButtonBuilder().setCustomId("data").setLabel("Guild data").setStyle(ButtonStyle.Secondary),
-                    new ButtonBuilder().setCustomId("purge").setLabel("Delete data").setStyle(ButtonStyle.Danger),
-                    new ButtonBuilder().setCustomId("cache").setLabel("Reset cache").setStyle(ButtonStyle.Success)
-                )
-            ]
-        });
-        let i;
-        try {
-            i = await m.awaitMessageComponent<ComponentType.Button>({
-                filter: (i) => i.user.id === interaction.user.id,
-                time: 300000
-            });
-        } catch {
-            return;
-        }
-        i.deferUpdate();
-        const guild = (await client.guilds.fetch(GuildID)) as Guild | null;
-        if (!guild) {
-            await interaction.editReply({
-                embeds: [new EmojiEmbed().setTitle("Admin").setDescription("Not in server").setStatus("Danger")],
-                components: []
-            });
-            return;
-        }
-        if (i.customId === "stats") {
-            await interaction.editReply({
-                embeds: [
-                    new EmojiEmbed()
-                        .setTitle("Stats")
-                        .setDescription(
-                            `**Name:** ${guild.name}\n` +
-                                `**ID:** \`${guild.id}\`\n` +
-                                `**Owner:** ${client.users.cache.get(guild.ownerId)!.tag}\n` +
-                                `**Member Count:** ${guild.memberCount}\n` +
-                                `**Created:** <t:${guild.createdTimestamp}:F>\n` +
-                                `**Added Nucleus:** <t:${guild.members.me!.joinedTimestamp}:R>\n` +
-                                `**Nucleus' Perms:** https://discordapi.com/permissions.html#${guild.members.me!.permissions.valueOf()}\n`
+                await interaction.editReply({
+                    embeds: [],
+                    components: [
+                        new ActionRowBuilder<ButtonBuilder>().addComponents(
+                            new ButtonBuilder().setCustomId("stats").setLabel("Stats").setStyle(ButtonStyle.Primary),
+                            new ButtonBuilder()
+                                .setCustomId("data")
+                                .setLabel("Guild data")
+                                .setStyle(ButtonStyle.Secondary),
+                            new ButtonBuilder()
+                                .setCustomId("cache")
+                                .setLabel("Reset cache")
+                                .setStyle(ButtonStyle.Success),
+                            new ButtonBuilder().setCustomId("leave").setLabel("Leave").setStyle(ButtonStyle.Danger),
+                            new ButtonBuilder()
+                                .setCustomId("purge")
+                                .setLabel("Delete data")
+                                .setStyle(ButtonStyle.Danger)
                         )
-                        .setStatus("Success")
-                        .setEmoji("SETTINGS.STATS.GREEN")
-                ]
-            });
-        } else if (i.customId === "leave") {
-            await guild.leave();
-            await interaction.editReply({
-                embeds: [
-                    new EmojiEmbed()
-                        .setTitle("Left")
-                        .setDescription(`Left ${guild.name}`)
-                        .setStatus("Success")
-                        .setEmoji("SETTINGS.STATS.GREEN")
-                ],
-                components: []
-            });
-        } else if (i.customId === "data") {
-            // Get all the data and convert to a string
-            const data = await client.database.guilds.read(guild.id);
-            const stringified = JSON.stringify(data, null, 2);
-            const buffer = Buffer.from(stringified);
-            const attachment = new AttachmentBuilder(buffer).setName("data.json");
-            await interaction.editReply({
-                embeds: [
-                    new EmojiEmbed().setTitle("Data").setDescription(`Data for ${guild.name}`).setStatus("Success")
-                ],
-                components: [],
-                files: [attachment]
-            });
-        } else if (i.customId === "purge") {
-            await client.database.guilds.delete(GuildID);
-            await client.database.history.delete(GuildID);
-            await client.database.notes.delete(GuildID);
-            await client.database.transcripts.deleteAll(GuildID);
-            await interaction.editReply({
-                embeds: [
-                    new EmojiEmbed()
-                        .setTitle("Purge")
-                        .setDescription(`Deleted data for ${guild.name}`)
-                        .setStatus("Success")
-                        .setEmoji("SETTINGS.STATS.GREEN")
-                ],
-                components: []
-            });
-        } else if (i.customId === "cache") {
-            await client.memory.forceUpdate(guild.id);
-            await interaction.editReply({
-                embeds: [
-                    new EmojiEmbed()
-                        .setTitle("Cache")
-                        .setDescription(`Reset cache for ${guild.name}`)
-                        .setStatus("Success")
-                        .setEmoji("SETTINGS.STATS.GREEN")
-                ],
-                components: []
-            });
+                    ]
+                });
+                let i;
+                try {
+                    i = await m.awaitMessageComponent<ComponentType.Button>({
+                        filter: (i) => i.user.id === interaction.user.id && i.message.id === m.id,
+                        time: 300000
+                    });
+                } catch {
+                    return;
+                }
+                const guild = (await client.guilds.fetch(GuildID)) as Guild | null;
+                if (!guild) {
+                    await i.deferUpdate();
+                    await interaction.editReply({
+                        embeds: [
+                            new EmojiEmbed().setTitle("Admin").setDescription("Not in server").setStatus("Danger")
+                        ],
+                        components: []
+                    });
+                    return;
+                }
+                if (i.customId === "stats") {
+                    await i.deferUpdate();
+                    await interaction.editReply({
+                        embeds: [
+                            new EmojiEmbed()
+                                .setTitle("Stats")
+                                .setDescription(
+                                    `**Name:** ${guild.name}\n` +
+                                        `**ID:** \`${guild.id}\`\n` +
+                                        `**Owner:** ${client.users.cache.get(guild.ownerId)!.tag}\n` +
+                                        `**Member Count:** ${guild.memberCount}\n` +
+                                        `**Created:** <t:${guild.createdTimestamp}:F>\n` +
+                                        `**Added Nucleus:** <t:${guild.members.me!.joinedTimestamp}:R>\n` +
+                                        `**Nucleus' Perms:** https://discordapi.com/permissions.html#${guild.members.me!.permissions.valueOf()}\n`
+                                )
+                                .setStatus("Success")
+                                .setEmoji("SETTINGS.STATS.GREEN")
+                        ]
+                    });
+                } else if (i.customId === "leave") {
+                    if (!(await confirm(i))) {
+                        await interaction.editReply({
+                            embeds: [new EmojiEmbed().setTitle("No changes were made").setStatus("Danger")],
+                            components: []
+                        });
+                        return;
+                    }
+                    await guild.leave();
+                    await interaction.editReply({
+                        embeds: [
+                            new EmojiEmbed()
+                                .setTitle("Left")
+                                .setDescription(`Left ${guild.name}`)
+                                .setStatus("Success")
+                                .setEmoji("SETTINGS.STATS.GREEN")
+                        ],
+                        components: []
+                    });
+                } else if (i.customId === "data") {
+                    await i.deferUpdate();
+                    // Get all the data and convert to a string
+                    const data = await client.database.guilds.read(guild.id);
+                    const stringified = JSON.stringify(data, null, 2);
+                    const buffer = Buffer.from(stringified);
+                    const attachment = new AttachmentBuilder(buffer).setName("data.json");
+                    await interaction.editReply({
+                        embeds: [
+                            new EmojiEmbed()
+                                .setTitle("Data")
+                                .setDescription(`Data for ${guild.name}`)
+                                .setStatus("Success")
+                        ],
+                        components: [],
+                        files: [attachment]
+                    });
+                } else if (i.customId === "purge") {
+                    if (!(await confirm(i))) {
+                        await interaction.editReply({
+                            embeds: [new EmojiEmbed().setTitle("No changes were made").setStatus("Danger")],
+                            components: []
+                        });
+                        return;
+                    }
+                    await client.database.guilds.delete(GuildID);
+                    await client.database.history.delete(GuildID);
+                    await client.database.notes.delete(GuildID);
+                    await client.database.transcripts.deleteAll(GuildID);
+                    await interaction.editReply({
+                        embeds: [
+                            new EmojiEmbed()
+                                .setTitle("Purge")
+                                .setDescription(`Deleted data for ${guild.name}`)
+                                .setStatus("Success")
+                                .setEmoji("SETTINGS.STATS.GREEN")
+                        ],
+                        components: []
+                    });
+                } else if (i.customId === "cache") {
+                    await i.deferUpdate();
+                    await client.memory.forceUpdate(guild.id);
+                    await interaction.editReply({
+                        embeds: [
+                            new EmojiEmbed()
+                                .setTitle("Cache")
+                                .setDescription(`Reset cache for ${guild.name}`)
+                                .setStatus("Success")
+                                .setEmoji("SETTINGS.STATS.GREEN")
+                        ],
+                        components: []
+                    });
+                }
+                break;
+            }
+            case "announce": {
+                const channelsToNotify = await client.database.guilds.staffChannels();
+                const modal2 = new ModalBuilder()
+                    .addComponents(
+                        new ActionRowBuilder<TextInputBuilder>().addComponents(
+                            new TextInputBuilder()
+                                .setStyle(TextInputStyle.Paragraph)
+                                .setLabel("Announcement")
+                                .setCustomId("announcement")
+                                .setPlaceholder("Announcement...")
+                        )
+                    )
+                    .setTitle("Announcement")
+                    .setCustomId("announce");
+                await i1.showModal(modal2);
+                let out: ModalSubmitInteraction;
+                try {
+                    out = await i1.awaitModalSubmit({
+                        filter: (i) => i.customId === "announce" && i.user.id === interaction.user.id,
+                        time: 300000
+                    });
+                } catch {
+                    return;
+                }
+                await out.deferUpdate();
+                const announcement = out.fields.getTextInputValue("announcement");
+                await interaction.editReply({
+                    embeds: [
+                        new EmojiEmbed()
+                            .setTitle("Announcement")
+                            .setDescription(
+                                `Announcement will be sent to ${channelsToNotify.length} channels.\n\n${announcement}`
+                            )
+                            .setStatus("Success")
+                            .setEmoji("SETTINGS.STATS.GREEN")
+                    ],
+                    components: [
+                        new ActionRowBuilder<ButtonBuilder>().addComponents(
+                            new ButtonBuilder()
+                                .setCustomId("confirm")
+                                .setLabel("Confirm")
+                                .setStyle(ButtonStyle.Success),
+                            new ButtonBuilder().setCustomId("cancel").setLabel("Cancel").setStyle(ButtonStyle.Danger)
+                        )
+                    ]
+                });
+
+                let i;
+                try {
+                    i = await m.awaitMessageComponent<ComponentType.Button>({
+                        filter: (i) => i.user.id === interaction.user.id,
+                        time: 300000
+                    });
+                } catch {
+                    return;
+                }
+                if (i.customId === "confirm") {
+                    await i.deferUpdate();
+                    await interaction.editReply({
+                        embeds: [
+                            new EmojiEmbed()
+                                .setTitle("Announcement")
+                                .setDescription(
+                                    `Sending to ${channelsToNotify.length} channels. Preview:\n\n${announcement}`
+                                )
+                                .setStatus("Success")
+                                .setEmoji("SETTINGS.STATS.GREEN")
+                        ],
+                        components: []
+                    });
+                    const announcementEmbed = new EmojiEmbed()
+                        .setTitle("Developer Announcement")
+                        .setDescription(announcement)
+                        .setStatus("Danger")
+                        .setEmoji("NUCLEUS.LOGO")
+                        .setFooter({
+                            text: `Sent by ${interaction.user.username}`,
+                            iconURL: interaction.user.displayAvatarURL()
+                        });
+                    for (const channel of channelsToNotify) {
+                        const ch = (await client.channels.fetch(channel)) as GuildTextBasedChannel | null;
+                        if (!ch) continue;
+                        await ch.send({
+                            embeds: [announcementEmbed]
+                        });
+                    }
+                    await interaction.editReply({
+                        embeds: [
+                            new EmojiEmbed()
+                                .setTitle("Announcement")
+                                .setDescription(
+                                    `Sent to ${channelsToNotify.length} channels. Preview:\n\n${announcement}`
+                                )
+                                .setStatus("Success")
+                                .setEmoji("SETTINGS.STATS.GREEN")
+                        ],
+                        components: []
+                    });
+                } else if (i.customId === "cancel") {
+                    await i.deferUpdate();
+                    await interaction.editReply({
+                        embeds: [new EmojiEmbed().setTitle("Announcement Cancelled").setStatus("Danger")],
+                        components: []
+                    });
+                }
+                break;
+            }
         }
     }
 };
diff --git a/src/commands/nucleus/suggest.ts b/src/commands/nucleus/suggest.ts
index 79a0673..c1f0312 100644
--- a/src/commands/nucleus/suggest.ts
+++ b/src/commands/nucleus/suggest.ts
@@ -1,61 +1,133 @@
 import { LoadingEmbed } from "../../utils/defaults.js";
-import { ButtonStyle, CommandInteraction } from "discord.js";
-import Discord from "discord.js";
+import Discord, {
+    ActionRowBuilder,
+    ButtonBuilder,
+    ButtonStyle,
+    CommandInteraction,
+    ModalBuilder,
+    TextInputBuilder,
+    TextInputStyle
+} from "discord.js";
 import type { SlashCommandSubcommandBuilder } from "discord.js";
 import confirmationMessage from "../../utils/confirmationMessage.js";
 import EmojiEmbed from "../../utils/generateEmojiEmbed.js";
 import client from "../../utils/client.js";
-import getEmojiByName from "../../utils/getEmojiByName.js";
+import config from "../../config/main.js";
+import _ from "lodash";
 
 const command = (builder: SlashCommandSubcommandBuilder) =>
-    builder
-        .setName("suggest")
-        .setDescription("Sends a suggestion to the developers")
-        .addStringOption((option) =>
-            option.setName("suggestion").setDescription("The suggestion to send").setRequired(true)
-        );
+    builder.setName("suggest").setDescription("Sends a suggestion to the developers");
 
 const callback = async (interaction: CommandInteraction): Promise<void> => {
     await interaction.guild?.members.fetch(interaction.member!.user.id);
-    const { renderUser } = client.logger;
-    const suggestion = interaction.options.get("suggestion")?.value as string;
     await interaction.reply({ embeds: LoadingEmbed, ephemeral: true });
-    const confirmation = await new confirmationMessage(interaction)
-        .setEmoji("ICONS.OPP.ADD")
-        .setTitle("Suggest")
-        .setDescription(
-            `**Suggestion:**\n> ${suggestion}\n` +
-                "Your username and ID will also be sent with your suggestion.\n\nAre you sure you want to send this suggestion?"
-        )
-        .setColor("Danger")
-        .setInverted(true)
-        .setFailedMessage("Your suggestion was deleted", "Success", "ICONS.ADD")
-        .send(true);
-    if (confirmation.cancelled || !confirmation.success) return;
-    await (client.channels.cache.get("955161206459600976") as Discord.TextChannel).send({
+    let closed = false;
+    let suggestionTitle: string | null = null;
+    let suggestionDesc: string | null = null;
+    do {
+        const modal = new ModalBuilder()
+            .setTitle("Suggestion")
+            .setComponents(
+                new ActionRowBuilder<TextInputBuilder>().addComponents(
+                    new TextInputBuilder()
+                        .setLabel("Suggestion Title")
+                        .setRequired(false)
+                        .setStyle(TextInputStyle.Short)
+                        .setCustomId("suggestionTitle")
+                        .setPlaceholder("Summarize your suggestion in 1 sentence...")
+                        .setMaxLength(256)
+                ),
+                new ActionRowBuilder<TextInputBuilder>().addComponents(
+                    new TextInputBuilder()
+                        .setLabel("Suggestion Description")
+                        .setCustomId("suggestionDesc")
+                        .setStyle(TextInputStyle.Paragraph)
+                        .setRequired(true)
+                        .setPlaceholder("Put the full details of your suggestion here...")
+                        .setMinLength(50)
+                )
+            );
+        const o: { suggestionDesc?: string; suggestionTitle?: string } = {};
+        if (suggestionTitle) {
+            o.suggestionTitle = suggestionTitle;
+            modal.components[0]!.components[0]!.setValue(suggestionTitle);
+        }
+        if (suggestionDesc) {
+            o.suggestionDesc = suggestionDesc;
+            modal.components[1]!.components[0]!.setValue(suggestionDesc);
+        }
+        const confirmation = await new confirmationMessage(interaction)
+            .setEmoji("ICONS.ADD")
+            .setTitle("Suggest")
+            .setDescription(
+                suggestionDesc
+                    ? `Are you sure you want to send this suggestion?\n\n**Title ${
+                          suggestionTitle ? "" : "(*Placeholder*)"
+                      }:**\n> ${
+                          suggestionTitle ? suggestionTitle : `${suggestionDesc.substring(0, 70)}`
+                      }\n\n**Suggestion:**\n> ${suggestionDesc}`
+                    : "Please enter your suggestion below."
+            )
+            .addModal("Edit Suggestion", "ICONS.EDIT", "editSuggestion", _.cloneDeep(o), modal)
+            .setColor("Success")
+            .setInverted(true)
+            .setFailedMessage("Your suggestion was deleted", "Success", "ICONS.ADD")
+            .send(true);
+        if (confirmation.modals?.[0] && !_.isEqual(confirmation.modals[0].values, o)) {
+            suggestionTitle = confirmation.modals[0].values["suggestionTitle"] as string | null;
+            suggestionDesc = confirmation.modals[0].values["suggestionDesc"] as string | null;
+            continue;
+        }
+        if (confirmation.cancelled || confirmation.success === false) {
+            closed = true;
+            return;
+        }
+        if (confirmation.success) {
+            closed = true;
+        }
+    } while (!closed);
+    if (!suggestionDesc) return;
+    suggestionTitle = suggestionTitle ? suggestionTitle : `${suggestionDesc.substring(0, 70)}`;
+    const channel = client.channels.cache.get(config.suggestionChannel) as Discord.TextChannel;
+    const m = await channel.send({ embeds: LoadingEmbed });
+    const issue = await client.GitHub.rest.issues.create({
+        owner: "ClicksMinutePer",
+        repo: "Nucleus",
+        title: suggestionTitle,
+        body: `Linked Suggestion in Private Developer Channel: [Message](${
+            m.url
+        })\n\n**Suggestion:**\n> ${suggestionDesc
+            .replaceAll("@", "@<!-- -->")
+            .replaceAll("/issues", "/issues<!-- -->")
+            .replaceAll("/pull", "/pull<!-- -->")}\n\n`,
+        labels: ["🤖 Auto", "📝 Suggestion"]
+    });
+    await m.edit({
         embeds: [
             new EmojiEmbed()
-                .setTitle("Suggestion")
-                .setDescription(
-                    `**From:** ${renderUser(
-                        interaction.member!.user as Discord.User
-                    )}\n**Suggestion:**\n> ${suggestion}\n\n` +
-                        `**Server:** ${interaction.guild!.name} (${interaction.guild!.id})\n`
-                )
-                .setStatus("Warning")
+                .setEmoji("ICONS.ADD")
+                .setTitle(`Suggestion from ${interaction.user.tag} (${interaction.user.id})`)
+                .setDescription(`**Suggestion:**\n> ${suggestionDesc}\n\n`)
+                .setStatus("Success")
+                .setFooter({ text: `${issue.data.number}` })
         ],
         components: [
-            new Discord.ActionRowBuilder<Discord.ButtonBuilder>().addComponents(
-                new Discord.ButtonBuilder()
-                    .setCustomId("suggestionAccept")
-                    .setLabel("Accept")
-                    .setStyle(ButtonStyle.Secondary)
-                    .setEmoji(getEmojiByName("ICONS.ADD", "id")),
-                new Discord.ButtonBuilder()
-                    .setCustomId("suggestionDeny")
-                    .setLabel("Delete")
-                    .setStyle(ButtonStyle.Secondary)
-                    .setEmoji(getEmojiByName("ICONS.REMOVE", "id"))
+            new Discord.ActionRowBuilder<ButtonBuilder>().addComponents(
+                new ButtonBuilder().setCustomId("accept:Suggestion").setLabel("Accept").setStyle(ButtonStyle.Success),
+                new ButtonBuilder().setCustomId("deny:Suggestion").setLabel("Deny").setStyle(ButtonStyle.Danger),
+                new ButtonBuilder().setCustomId("close:Suggestion").setLabel("Close").setStyle(ButtonStyle.Secondary),
+                new ButtonBuilder()
+                    .setCustomId("implemented:Suggestion")
+                    .setLabel("Implemented")
+                    .setStyle(ButtonStyle.Secondary),
+                new ButtonBuilder()
+                    .setLabel(`Open Issue #${issue.data.number}`)
+                    .setStyle(ButtonStyle.Link)
+                    .setURL(`https://github.com/ClicksMinutePer/Nucleus/issues/${issue.data.number}`)
+            ),
+            new Discord.ActionRowBuilder<ButtonBuilder>().addComponents(
+                new ButtonBuilder().setCustomId("lock:Suggestion").setLabel("Lock").setStyle(ButtonStyle.Danger),
+                new ButtonBuilder().setCustomId("spam:Suggestion").setLabel("Mark as Spam").setStyle(ButtonStyle.Danger)
             )
         ]
     });
diff --git a/src/commands/privacy.ts b/src/commands/privacy.ts
index 590e866..aa17e7b 100644
--- a/src/commands/privacy.ts
+++ b/src/commands/privacy.ts
@@ -29,11 +29,11 @@
                     .setDescription(
                         "Nucleus is a bot that naturally needs to store data about servers.\n" +
                             "We are entirely [open source](https://github.com/ClicksMinutePer/Nucleus), so you can check exactly what we store, and how it works.\n\n" +
-                            "Any questions about Nucleus, how it works, and what data is stored can be asked in [our server](https://discord.gg/bPaNnxe)."
+                            "Any questions about Nucleus, how it works, and what data is stored can be asked in [our server](https://discord.gg/bPaNnxe)." +
+                            "\n\n[[Privacy Policy]](https://clicksminuteper.github.io/policies/nucleus) | [[Terms of Service]](https://clicksminuteper.github.io/policies/nucleustos)"
                     )
                     .setEmoji("NUCLEUS.LOGO")
                     .setStatus("Danger")
-                    .setFooter({ text: "https://clicksminuteper.github.io/policies/nucleus" })
             )
             .setTitle("Welcome")
             .setDescription("General privacy information")
@@ -43,15 +43,16 @@
                 new EmojiEmbed()
                     .setTitle("Scanners")
                     .setDescription(
-                        "Nucleus uses [unscan](https://rapidapi.com/abcdan/api/unscan/) to scan links, images and files for malware and other threats.\n" +
-                            'This service\'s [privacy policy](https://unscan.co/policies) is public, and they "do not store or sell your data."'
+                        "Nucleus scans content sent by users for malware and NSFW content\n" +
+                            "Malware is detected using [ClamAV](https://clamav.net/), and the standard ClamAV database.\n" +
+                            "NSFW detection is provided by [NsfwJS](https://nsfwjs.com/), with a model provided by [GantMan](https://github.com/GantMan/nsfw_model/releases/tag/1.1.0)\n\n" +
+                            "All data is processed on our servers and is not processed by a 3rd party."
                     )
                     .setEmoji("NUCLEUS.LOGO")
                     .setStatus("Danger")
-                    .setFooter({ text: "https://clicksminuteper.github.io/policies/nucleus" })
             )
             .setTitle("Scanners")
-            .setDescription("About Unscan")
+            .setDescription("About Scanners")
             .setPageId(1),
         new Embed()
             .setEmbed(
@@ -62,13 +63,12 @@
                     )
                     .setEmoji("NUCLEUS.LOGO")
                     .setStatus("Danger")
-                    .setFooter({ text: "https://clicksminuteper.github.io/policies/nucleus" })
             )
             .setTitle("Link scanning and Transcripts")
             .setDescription("Information about how links and images are scanned, and transcripts are stored")
             .setPageId(2)
     ].concat(
-        (interaction.member as Discord.GuildMember).permissions.has("Administrator")
+        (interaction.member as Discord.GuildMember).id === interaction.guild!.ownerId
             ? [
                   new Embed()
                       .setEmbed(
@@ -77,7 +77,6 @@
                               .setDescription("Below are buttons for controlling this servers privacy settings")
                               .setEmoji("NUCLEUS.LOGO")
                               .setStatus("Danger")
-                              .setFooter({ text: "https://clicksminuteper.github.io/policies/nucleus" })
                       )
                       .setTitle("Options")
                       .setDescription("Options")
@@ -88,7 +87,6 @@
                                   .setLabel("Clear all data")
                                   .setCustomId("clear-all-data")
                                   .setStyle(ButtonStyle.Danger)
-                                  .setDisabled(!(interaction.user.id === interaction.guild!.ownerId))
                           ])
                       ])
               ]
@@ -214,7 +212,7 @@
             const em = new Discord.EmbedBuilder(pages[page]!.embed);
             em.setDescription(em.data.description + "\n\n" + createPageIndicator(pages.length, page));
             em.setFooter({ text: "Message closed" });
-            interaction.editReply({ embeds: [em], components: [] });
+            await interaction.editReply({ embeds: [em], components: [] });
             return;
         }
     }
diff --git a/src/commands/server/about.ts b/src/commands/server/about.ts
index 815b9e6..1857653 100644
--- a/src/commands/server/about.ts
+++ b/src/commands/server/about.ts
@@ -32,7 +32,7 @@
 const callback = async (interaction: CommandInteraction): Promise<void> => {
     const guild = interaction.guild!;
     const { renderUser, renderDelta } = client.logger;
-    interaction.reply({
+    await interaction.reply({
         embeds: [
             new EmojiEmbed()
                 .setTitle("Server Info")
diff --git a/src/commands/server/buttons.ts b/src/commands/server/buttons.ts
index 3ba9c25..f07f3ce 100644
--- a/src/commands/server/buttons.ts
+++ b/src/commands/server/buttons.ts
@@ -20,6 +20,7 @@
 import lodash from "lodash";
 import getEmojiByName from "../../utils/getEmojiByName.js";
 import { modalInteractionCollector } from "../../utils/dualCollector.js";
+import _ from "lodash";
 
 export const command = new SlashCommandSubcommandBuilder()
     .setName("buttons")
@@ -50,6 +51,27 @@
     createticket: "Create Ticket"
 };
 
+const presetButtons = [
+    {
+        title: "Verify",
+        description: "Click the button below to get verified in the server.",
+        buttons: ["verifybutton"],
+        color: "GREEN"
+    },
+    {
+        title: "Get Roles",
+        description: "Click the button to choose which roles you would like in the server",
+        buttons: ["rolemenu"],
+        color: "BLUE"
+    },
+    {
+        title: "Create Ticket",
+        description: "Click the button below to create a ticket",
+        buttons: ["createticket"],
+        color: "RED"
+    }
+];
+
 export const callback = async (interaction: CommandInteraction): Promise<void> => {
     const m = await interaction.reply({
         embeds: LoadingEmbed,
@@ -58,7 +80,7 @@
     });
 
     let closed = false;
-    const data: Data = {
+    let data: Data = {
         buttons: [],
         title: null,
         description: null,
@@ -67,7 +89,11 @@
     };
     do {
         const buttons = new ActionRowBuilder<ButtonBuilder>().addComponents(
-            new ButtonBuilder().setCustomId("edit").setLabel("Edit Embed").setStyle(ButtonStyle.Secondary),
+            new ButtonBuilder()
+                .setCustomId("edit")
+                .setLabel("Edit Embed")
+                .setStyle(ButtonStyle.Secondary)
+                .setEmoji(getEmojiByName("ICONS.EDIT", "id") as APIMessageComponentEmoji),
             new ButtonBuilder()
                 .setCustomId("send")
                 .setLabel("Send")
@@ -91,6 +117,22 @@
                 )
         );
 
+        const presetSelect = new ActionRowBuilder<StringSelectMenuBuilder>().addComponents(
+            new StringSelectMenuBuilder()
+                .setCustomId("preset")
+                .setPlaceholder("Select a preset")
+                .setMaxValues(1)
+                .addOptions(
+                    presetButtons.map((preset, i) => {
+                        return new StringSelectMenuOptionBuilder()
+                            .setLabel(preset.title)
+                            .setValue(i.toString())
+                            .setDescription(preset.description)
+                            .setEmoji(getEmojiByName("COLORS." + preset.color, "id") as APIMessageComponentEmoji);
+                    })
+                )
+        );
+
         const buttonSelect = new ActionRowBuilder<StringSelectMenuBuilder>().addComponents(
             new StringSelectMenuBuilder()
                 .setCustomId("button")
@@ -137,13 +179,14 @@
 
         await interaction.editReply({
             embeds: [embed],
-            components: [colorSelect, buttonSelect, channelMenu, buttons]
+            components: [presetSelect, colorSelect, buttonSelect, channelMenu, buttons]
         });
 
         let i: Discord.ButtonInteraction | Discord.ChannelSelectMenuInteraction | Discord.StringSelectMenuInteraction;
         try {
             i = (await interaction.channel!.awaitMessageComponent({
-                filter: (i: Discord.Interaction) => i.user.id === interaction.user.id,
+                filter: (i: Discord.Interaction) =>
+                    i.user.id === interaction.user.id && i.isMessageComponent() && i.message.id === m.id,
                 time: 300000
             })) as
                 | Discord.ButtonInteraction
@@ -223,17 +266,18 @@
                 case "send": {
                     await i.deferUpdate();
                     const channel = interaction.guild!.channels.cache.get(data.channel!) as Discord.TextChannel;
-                    const components = new ActionRowBuilder<ButtonBuilder>();
+                    const messageData: MessageCreateOptions = {};
                     for (const button of data.buttons) {
-                        components.addComponents(
-                            new ButtonBuilder()
-                                .setCustomId(button)
-                                .setLabel(buttonNames[button]!)
-                                .setStyle(ButtonStyle.Primary)
-                        );
+                        messageData.components = [
+                            new ActionRowBuilder<ButtonBuilder>().addComponents(
+                                new ButtonBuilder()
+                                    .setCustomId(button)
+                                    .setLabel(buttonNames[button]!)
+                                    .setStyle(ButtonStyle.Primary)
+                            )
+                        ];
                     }
-                    const messageData: MessageCreateOptions = { components: [components] };
-                    if (data.title || data.description) {
+                    if (data.title || data.description || data.color) {
                         const e = new EmojiEmbed();
                         if (data.title) e.setTitle(data.title);
                         if (data.description) e.setDescription(data.description);
@@ -251,6 +295,12 @@
                 console.log(err);
             }
             switch (i.customId) {
+                case "preset": {
+                    const chosen = presetButtons[parseInt(i.values[0]!)]!;
+                    const newColor = colors[chosen.color!]!;
+                    data = _.assign(data, chosen, { color: newColor });
+                    break;
+                }
                 case "color": {
                     data.color = colors[i.values[0]!]!;
                     break;
diff --git a/src/commands/settings/automod.ts b/src/commands/settings/automod.ts
index 684edf4..7756ae7 100644
--- a/src/commands/settings/automod.ts
+++ b/src/commands/settings/automod.ts
@@ -28,6 +28,7 @@
 import getEmojiByName from "../../utils/getEmojiByName.js";
 import { modalInteractionCollector } from "../../utils/dualCollector.js";
 import listToAndMore from "../../utils/listToAndMore.js";
+import _ from "lodash";
 
 const command = (builder: SlashCommandSubcommandBuilder) =>
     builder.setName("automod").setDescription("Setting for automatic moderation features");
@@ -157,6 +158,7 @@
 const imageMenu = async (
     interaction: StringSelectMenuInteraction,
     m: Message,
+    unsavedChanges: boolean,
     current: {
         NSFW: boolean;
         size: boolean;
@@ -188,7 +190,10 @@
             // .setEmoji("")  // TODO
             .setDescription(
                 `${emojiFromBoolean(current.NSFW)} **NSFW**\n` + `${emojiFromBoolean(current.size)} **Size**\n`
-            );
+            )
+            .setFooter({
+                text: unsavedChanges ? "No changes made" : "Changes not saved"
+            });
 
         await interaction.editReply({ embeds: [embed], components: [options] });
 
@@ -209,10 +214,12 @@
             }
             case "nsfw": {
                 current.NSFW = !current.NSFW;
+                unsavedChanges = true;
                 break;
             }
             case "size": {
                 current.size = !current.size;
+                unsavedChanges = true;
                 break;
             }
         }
@@ -223,6 +230,7 @@
 const wordMenu = async (
     interaction: StringSelectMenuInteraction,
     m: Message,
+    unsavedChanges: boolean,
     current: {
         enabled: boolean;
         words: { strict: string[]; loose: string[] };
@@ -298,7 +306,10 @@
                     )
             )
             .setStatus("Success")
-            .setEmoji("GUILD.SETTINGS.GREEN");
+            .setEmoji("GUILD.SETTINGS.GREEN")
+            .setFooter({
+                text: unsavedChanges ? "No changes made" : "Changes not saved"
+            });
 
         await interaction.editReply({ embeds: [embed], components: [selectMenu, buttons] });
 
@@ -322,6 +333,7 @@
                 }
                 case "enabled": {
                     current.enabled = !current.enabled;
+                    unsavedChanges = true;
                     break;
                 }
             }
@@ -393,6 +405,7 @@
                         .split(",")
                         .map((s) => s.trim())
                         .filter((s) => s.length > 0);
+                    unsavedChanges = true;
                     break;
                 }
                 case "allowedUsers": {
@@ -404,6 +417,7 @@
                         "member",
                         "Word Filter"
                     );
+                    unsavedChanges = true;
                     break;
                 }
                 case "allowedRoles": {
@@ -415,6 +429,7 @@
                         "role",
                         "Word Filter"
                     );
+                    unsavedChanges = true;
                     break;
                 }
                 case "allowedChannels": {
@@ -426,6 +441,7 @@
                         "channel",
                         "Word Filter"
                     );
+                    unsavedChanges = true;
                     break;
                 }
             }
@@ -437,6 +453,7 @@
 const inviteMenu = async (
     interaction: StringSelectMenuInteraction,
     m: Message,
+    unsavedChanges: boolean,
     current: {
         enabled: boolean;
         allowed: { users: string[]; roles: string[]; channels: string[] };
@@ -505,7 +522,10 @@
                     )
             )
             .setStatus("Success")
-            .setEmoji("GUILD.SETTINGS.GREEN");
+            .setEmoji("GUILD.SETTINGS.GREEN")
+            .setFooter({
+                text: unsavedChanges ? "No changes made" : "Changes not saved"
+            });
 
         await interaction.editReply({ embeds: [embed], components: [menu, buttons] });
 
@@ -528,6 +548,7 @@
                 }
                 case "enabled": {
                     current.enabled = !current.enabled;
+                    unsavedChanges = true;
                     break;
                 }
             }
@@ -542,6 +563,7 @@
                         "member",
                         "Invite Settings"
                     );
+                    unsavedChanges = true;
                     break;
                 }
                 case "roles": {
@@ -552,6 +574,7 @@
                         "role",
                         "Invite Settings"
                     );
+                    unsavedChanges = true;
                     break;
                 }
                 case "channels": {
@@ -562,6 +585,7 @@
                         "channel",
                         "Invite Settings"
                     );
+                    unsavedChanges = true;
                     break;
                 }
             }
@@ -573,6 +597,7 @@
 const mentionMenu = async (
     interaction: StringSelectMenuInteraction,
     m: Message,
+    unsavedChanges: boolean,
     current: {
         mass: number;
         everyone: boolean;
@@ -689,7 +714,10 @@
                     )
             )
             .setStatus("Success")
-            .setEmoji("GUILD.SETTINGS.GREEN");
+            .setEmoji("GUILD.SETTINGS.GREEN")
+            .setFooter({
+                text: unsavedChanges ? "No changes made" : "Changes not saved"
+            });
 
         await interaction.editReply({ embeds: [embed], components: [menu, allowedMenu, buttons] });
 
@@ -713,10 +741,12 @@
                 }
                 case "everyone": {
                     current.everyone = !current.everyone;
+                    unsavedChanges = true;
                     break;
                 }
                 case "roles": {
                     current.roles = !current.roles;
+                    unsavedChanges = true;
                     break;
                 }
             }
@@ -766,6 +796,7 @@
                             if (!out) break;
                             if (out.isButton()) break;
                             current.mass = parseInt(out.fields.getTextInputValue("mass"));
+                            unsavedChanges = true;
                             break;
                         }
                         case "roles": {
@@ -777,6 +808,7 @@
                                 "role",
                                 "Mention Settings"
                             );
+                            unsavedChanges = true;
                             break;
                         }
                     }
@@ -793,6 +825,7 @@
                                 "member",
                                 "Mention Settings"
                             );
+                            unsavedChanges = true;
                             break;
                         }
                         case "roles": {
@@ -803,6 +836,7 @@
                                 "role",
                                 "Mention Settings"
                             );
+                            unsavedChanges = true;
                             break;
                         }
                         case "channels": {
@@ -813,6 +847,7 @@
                                 "channel",
                                 "Mention Settings"
                             );
+                            unsavedChanges = true;
                             break;
                         }
                     }
@@ -827,6 +862,7 @@
 const cleanMenu = async (
     interaction: StringSelectMenuInteraction,
     m: Message,
+    unsavedChanges: boolean,
     current?: {
         channels?: string[];
         allowed?: {
@@ -889,7 +925,10 @@
                             : "None"
                     }\n\n`
             )
-            .setStatus("Success");
+            .setStatus("Success")
+            .setFooter({
+                text: unsavedChanges ? "No changes made" : "Changes not saved"
+            });
 
         await interaction.editReply({ embeds: [embed], components: [channelMenu, allowedMenu, buttons] });
 
@@ -957,6 +996,7 @@
                             }
                         }
                     }
+                    unsavedChanges = true;
                     break;
                 }
                 case "allowed": {
@@ -969,6 +1009,7 @@
                                 "member",
                                 "Mention Settings"
                             );
+                            unsavedChanges = true;
                             break;
                         }
                         case "roles": {
@@ -979,6 +1020,7 @@
                                 "role",
                                 "Mention Settings"
                             );
+                            unsavedChanges = true;
                             break;
                         }
                     }
@@ -1000,15 +1042,19 @@
 const callback = async (interaction: CommandInteraction): Promise<void> => {
     if (!interaction.guild) return;
     const m = await interaction.reply({ embeds: LoadingEmbed, fetchReply: true, ephemeral: true });
-    const config = (await client.database.guilds.read(interaction.guild.id)).filters;
+    let config = (await client.database.guilds.read(interaction.guild.id)).filters;
 
     let closed = false;
 
-    const button = new ActionRowBuilder<ButtonBuilder>().addComponents(
-        new ButtonBuilder().setCustomId("save").setLabel("Save").setStyle(ButtonStyle.Success)
-    );
-
+    let current = _.cloneDeep(config);
     do {
+        const button = new ActionRowBuilder<ButtonBuilder>().addComponents(
+            new ButtonBuilder()
+                .setCustomId("save")
+                .setLabel("Save")
+                .setStyle(ButtonStyle.Success)
+                .setDisabled(_.isEqual(config, current))
+        );
         const selectMenu = new ActionRowBuilder<StringSelectMenuBuilder>().addComponents(
             new StringSelectMenuBuilder()
                 .setCustomId("filter")
@@ -1054,7 +1100,10 @@
                     `${emojiFromBoolean(config.clean.channels.length > 0)} **Clean**\n`
             )
             .setStatus("Success")
-            .setEmoji("GUILD.SETTINGS.GREEN");
+            .setEmoji("GUILD.SETTINGS.GREEN")
+            .setFooter({
+                text: _.isEqual(config, current) ? "No changes made" : "Changes not saved"
+            });
 
         await interaction.editReply({ embeds: [embed], components: [selectMenu, button] });
 
@@ -1068,40 +1117,37 @@
             closed = true;
             continue;
         }
+        await i.deferUpdate();
         if (i.isButton()) {
-            await i.deferUpdate();
-            await client.database.guilds.write(interaction.guild.id, { filters: config });
+            await client.database.guilds.write(interaction.guild.id, { filters: current });
             await client.memory.forceUpdate(interaction.guild.id);
+            config = current;
+            current = _.cloneDeep(config);
         } else {
             switch (i.values[0]) {
                 case "invites": {
-                    i.deferUpdate();
-                    config.invite = await inviteMenu(i, m, config.invite);
+                    config.invite = await inviteMenu(i, m, _.isEqual(config, current), config.invite);
                     break;
                 }
                 case "mentions": {
-                    i.deferUpdate();
-                    config.pings = await mentionMenu(i, m, config.pings);
+                    config.pings = await mentionMenu(i, m, _.isEqual(config, current), config.pings);
                     break;
                 }
                 case "words": {
-                    config.wordFilter = await wordMenu(i, m, config.wordFilter);
+                    config.wordFilter = await wordMenu(i, m, _.isEqual(config, current), config.wordFilter);
                     break;
                 }
                 case "malware": {
-                    i.deferUpdate();
                     config.malware = !config.malware;
                     break;
                 }
                 case "images": {
-                    i.deferUpdate();
-                    const next = await imageMenu(i, m, config.images);
+                    const next = await imageMenu(i, m, _.isEqual(config, current), config.images);
                     config.images = next;
                     break;
                 }
                 case "clean": {
-                    i.deferUpdate();
-                    const next = await cleanMenu(i, m, config.clean);
+                    const next = await cleanMenu(i, m, _.isEqual(config, current), config.clean);
                     config.clean = next;
                     break;
                 }
diff --git a/src/commands/settings/autopublish.ts b/src/commands/settings/autopublish.ts
index afc4e7d..421cfb8 100644
--- a/src/commands/settings/autopublish.ts
+++ b/src/commands/settings/autopublish.ts
@@ -20,7 +20,7 @@
     .setDescription("Automatically publish messages posted in announcement channels");
 
 export const callback = async (interaction: CommandInteraction): Promise<void> => {
-    await interaction.reply({
+    const m = await interaction.reply({
         embeds: LoadingEmbed,
         ephemeral: true,
         fetchReply: true
@@ -70,7 +70,8 @@
         let i: Discord.ButtonInteraction | Discord.ChannelSelectMenuInteraction;
         try {
             i = (await interaction.channel!.awaitMessageComponent({
-                filter: (i: Discord.Interaction) => i.user.id === interaction.user.id,
+                filter: (i: Discord.Interaction) =>
+                    i.user.id === interaction.user.id && i.isMessageComponent() && i.message.id === m.id,
                 time: 300000
             })) as Discord.ButtonInteraction | Discord.ChannelSelectMenuInteraction;
         } catch (e) {
diff --git a/src/commands/settings/logs/attachment.ts b/src/commands/settings/logs/attachment.ts
index 3ee7675..62abd7e 100644
--- a/src/commands/settings/logs/attachment.ts
+++ b/src/commands/settings/logs/attachment.ts
@@ -18,7 +18,7 @@
 
 const callback = async (interaction: CommandInteraction): Promise<unknown> => {
     if (interaction.guild) client.database.premium.hasPremium(interaction.guild.id).finally(() => {});
-    await interaction.reply({
+    const m = await interaction.reply({
         embeds: LoadingEmbed,
         ephemeral: true,
         fetchReply: true
@@ -79,7 +79,7 @@
 
         let i: Discord.ButtonInteraction | Discord.SelectMenuInteraction;
         try {
-            i = (await interaction.channel!.awaitMessageComponent({
+            i = (await m.awaitMessageComponent({
                 filter: (i: Discord.Interaction) => i.user.id === interaction.user.id,
                 time: 300000
             })) as Discord.ButtonInteraction | Discord.SelectMenuInteraction;
diff --git a/src/commands/settings/logs/events.ts b/src/commands/settings/logs/events.ts
index 4cffab7..1041409 100644
--- a/src/commands/settings/logs/events.ts
+++ b/src/commands/settings/logs/events.ts
@@ -122,7 +122,7 @@
         let i: ButtonInteraction | StringSelectMenuInteraction | ChannelSelectMenuInteraction;
         try {
             i = (await m.awaitMessageComponent({
-                filter: (i) => i.user.id === interaction.user.id,
+                filter: (i) => i.user.id === interaction.user.id && i.isMessageComponent() && i.message.id === m.id,
                 time: 300000
             })) as ButtonInteraction | StringSelectMenuInteraction | ChannelSelectMenuInteraction;
         } catch (e) {
diff --git a/src/commands/settings/logs/warnings.ts b/src/commands/settings/logs/warnings.ts
index 38b645a..37c5ac8 100644
--- a/src/commands/settings/logs/warnings.ts
+++ b/src/commands/settings/logs/warnings.ts
@@ -5,26 +5,28 @@
     ButtonBuilder,
     ButtonStyle,
     ChannelSelectMenuBuilder,
-    ChannelType
+    ChannelType,
+    ComponentType
 } from "discord.js";
 import EmojiEmbed from "../../../utils/generateEmojiEmbed.js";
 import getEmojiByName from "../../../utils/getEmojiByName.js";
 import type { SlashCommandSubcommandBuilder } from "discord.js";
 import client from "../../../utils/client.js";
+import _ from "lodash";
 
 const command = (builder: SlashCommandSubcommandBuilder) =>
     builder.setName("warnings").setDescription("Settings for the staff notifications channel");
 
 const callback = async (interaction: CommandInteraction): Promise<unknown> => {
     if (!interaction.guild) return;
-    await interaction.reply({
+    const m = await interaction.reply({
         embeds: LoadingEmbed,
         ephemeral: true,
         fetchReply: true
     });
 
     let data = await client.database.guilds.read(interaction.guild.id);
-    let channel = data.logging.staff.channel;
+    let channel = _.clone(data.logging.staff.channel);
     let closed = false;
     do {
         const channelMenu = new ActionRowBuilder<ChannelSelectMenuBuilder>().addComponents(
@@ -45,7 +47,7 @@
                 .setLabel("Save")
                 .setStyle(ButtonStyle.Success)
                 .setEmoji(getEmojiByName("ICONS.SAVE", "id") as Discord.APIMessageComponentEmoji)
-                .setDisabled(channel === data.logging.staff.channel)
+                .setDisabled(_.isEqual(channel, data.logging.staff.channel))
         );
 
         const embed = new EmojiEmbed()
@@ -62,12 +64,13 @@
             components: [channelMenu, buttons]
         });
 
-        let i: Discord.ButtonInteraction | Discord.SelectMenuInteraction;
+        let i: Discord.ButtonInteraction | Discord.ChannelSelectMenuInteraction;
         try {
-            i = (await interaction.channel!.awaitMessageComponent({
-                filter: (i: Discord.Interaction) => i.user.id === interaction.user.id,
+            i = await interaction.channel!.awaitMessageComponent<ComponentType.Button | ComponentType.ChannelSelect>({
+                filter: (i: Discord.Interaction) =>
+                    i.user.id === interaction.user.id && i.isMessageComponent() && i.message.id === m.id,
                 time: 300000
-            })) as Discord.ButtonInteraction | Discord.SelectMenuInteraction;
+            });
         } catch (e) {
             closed = true;
             continue;
@@ -81,7 +84,7 @@
                 }
                 case "save": {
                     await client.database.guilds.write(interaction.guild!.id, {
-                        "logging.warnings.channel": channel
+                        "logging.staff.channel": channel
                     });
                     data = await client.database.guilds.read(interaction.guild!.id);
                     await client.memory.forceUpdate(interaction.guild!.id);
diff --git a/src/commands/settings/moderation.ts b/src/commands/settings/moderation.ts
index 6ee6e1e..4d850a9 100644
--- a/src/commands/settings/moderation.ts
+++ b/src/commands/settings/moderation.ts
@@ -29,7 +29,6 @@
     while (!timedOut) {
         const config = await client.database.guilds.read(interaction.guild!.id);
         const moderation = config.moderation;
-        console.log(moderation);
         await interaction.editReply({
             embeds: [
                 new EmojiEmbed()
diff --git a/src/commands/settings/rolemenu.ts b/src/commands/settings/rolemenu.ts
index e683e4f..7da9dfe 100644
--- a/src/commands/settings/rolemenu.ts
+++ b/src/commands/settings/rolemenu.ts
@@ -89,7 +89,7 @@
         out = null;
     }
     if (!out) return;
-    out.deferUpdate();
+    await out.deferUpdate();
     if (out.isButton()) return;
     const values = out.values;
 
@@ -218,7 +218,7 @@
                     `**Max:** ${data.max}\n`
             );
 
-        interaction.editReply({ embeds: [embed], components: [previewSelect, buttons] });
+        await interaction.editReply({ embeds: [embed], components: [previewSelect, buttons] });
         let i: StringSelectMenuInteraction | ButtonInteraction;
         try {
             i = (await m.awaitMessageComponent({
@@ -304,7 +304,7 @@
                     }\n`
             );
 
-        interaction.editReply({
+        await interaction.editReply({
             embeds: [embed],
             components: [new ActionRowBuilder<RoleSelectMenuBuilder>().addComponents(roleSelect), buttons]
         });
diff --git a/src/commands/settings/stats.ts b/src/commands/settings/stats.ts
index d4e4439..ed2fc6f 100644
--- a/src/commands/settings/stats.ts
+++ b/src/commands/settings/stats.ts
@@ -198,7 +198,7 @@
                             )
                         ]
                     });
-                    showModal(i, { name: newChannelName, enabled: newChannelEnabled });
+                    await showModal(i, { name: newChannelName, enabled: newChannelEnabled });
 
                     const out: Discord.ModalSubmitInteraction | ButtonInteraction | null =
                         await modalInteractionCollector(m, interaction.user);
@@ -336,7 +336,7 @@
             }
         }
 
-        interaction.editReply({
+        await interaction.editReply({
             embeds: [embed],
             components: [
                 new ActionRowBuilder<StringSelectMenuBuilder>().addComponents(pageSelect),
@@ -367,7 +367,7 @@
                     modified = true;
                     switch (i.values[0]!) {
                         case "edit": {
-                            showModal(i, current!);
+                            await showModal(i, current!);
                             await interaction.editReply({
                                 embeds: [
                                     new EmojiEmbed()
@@ -439,7 +439,7 @@
                 }
                 case "save": {
                     await client.database.guilds.write(interaction.guild.id, { stats: currentObject });
-                    singleNotify("statsChannelDeleted", interaction.guild.id, true);
+                    await singleNotify("statsChannelDeleted", interaction.guild.id, true);
                     modified = false;
                     await client.memory.forceUpdate(interaction.guild.id);
                     break;
diff --git a/src/commands/settings/tracks.ts b/src/commands/settings/tracks.ts
index 625bcfb..e608f31 100644
--- a/src/commands/settings/tracks.ts
+++ b/src/commands/settings/tracks.ts
@@ -142,7 +142,7 @@
         out = null;
     }
     if (!out) return;
-    out.deferUpdate();
+    await out.deferUpdate();
     if (out.isButton()) return;
     const values = out.values;
 
@@ -171,6 +171,7 @@
     const isAdmin = (interaction.member!.permissions as PermissionsBitField).has("Administrator");
     if (!current) {
         current = _.cloneDeep(defaultTrackData);
+        current.name = "Default";
     }
 
     const roleSelect = new ActionRowBuilder<RoleSelectMenuBuilder>().addComponents(
@@ -268,7 +269,7 @@
         ];
         if (current.track.length >= 1) comps.splice(1, 0, selectMenu);
 
-        interaction.editReply({ embeds: [embed], components: comps });
+        await interaction.editReply({ embeds: [embed], components: comps });
 
         let out: ButtonInteraction | RoleSelectMenuInteraction | StringSelectMenuInteraction | null;
 
@@ -286,7 +287,7 @@
         if (out.isButton()) {
             switch (out.customId) {
                 case "back": {
-                    out.deferUpdate();
+                    await out.deferUpdate();
                     closed = true;
                     break;
                 }
@@ -295,23 +296,23 @@
                     break;
                 }
                 case "reorder": {
-                    out.deferUpdate();
+                    await out.deferUpdate();
                     current.track = (await reorderTracks(interaction, out, message, roles, current.track))!;
                     break;
                 }
                 case "retainPrevious": {
-                    out.deferUpdate();
+                    await out.deferUpdate();
                     current.retainPrevious = !current.retainPrevious;
                     break;
                 }
                 case "nullable": {
-                    out.deferUpdate();
+                    await out.deferUpdate();
                     current.nullable = !current.nullable;
                     break;
                 }
             }
         } else if (out.isStringSelectMenu()) {
-            out.deferUpdate();
+            await out.deferUpdate();
             switch (out.customId) {
                 case "removeRole": {
                     const index = current.track.findIndex(
@@ -322,7 +323,7 @@
                 }
             }
         } else {
-            out.deferUpdate();
+            await out.deferUpdate();
             switch (out.customId) {
                 case "addRole": {
                     const role = out.values![0]!;
@@ -348,16 +349,15 @@
 const callback = async (interaction: CommandInteraction) => {
     const m = await interaction.reply({ embeds: LoadingEmbed, fetchReply: true, ephemeral: true });
     const config = await client.database.guilds.read(interaction.guild!.id);
-    const tracks: ObjectSchema[] = config.tracks;
+    const tracks: ObjectSchema[] = _.cloneDeep(config.tracks);
     const roles = await interaction.guild!.roles.fetch();
 
     let page = 0;
     let closed = false;
-    let modified = false;
 
     do {
         const embed = new EmojiEmbed().setTitle("Track Settings").setEmoji("TRACKS.ICON").setStatus("Success");
-        const noTracks = config.tracks.length === 0;
+        const noTracks = tracks.length === 0;
         let current: ObjectSchema;
 
         const pageSelect = new StringSelectMenuBuilder().setCustomId("page").setPlaceholder("Select a track to manage");
@@ -398,7 +398,7 @@
                 .setLabel("Save")
                 .setEmoji(getEmojiByName("ICONS.SAVE", "id") as APIMessageComponentEmoji)
                 .setStyle(ButtonStyle.Success)
-                .setDisabled(!modified)
+                .setDisabled(_.isEqual(tracks, config.tracks))
         );
         if (noTracks) {
             embed.setDescription(
@@ -471,13 +471,13 @@
                 case "add": {
                     const newPage = await editTrack(i, m, roles);
                     if (_.isEqual(newPage, defaultTrackData)) break;
-                    tracks.push();
+                    if (!newPage) break;
+                    tracks.push(newPage);
                     page = tracks.length - 1;
                     break;
                 }
                 case "save": {
-                    client.database.guilds.write(interaction.guild!.id, { tracks: tracks });
-                    modified = false;
+                    await client.database.guilds.write(interaction.guild!.id, { tracks: tracks });
                     await client.memory.forceUpdate(interaction.guild!.id);
                     break;
                 }
@@ -490,7 +490,6 @@
                             const edited = await editTrack(i, m, roles, current!);
                             if (!edited) break;
                             tracks[page] = edited;
-                            modified = true;
                             break;
                         }
                         case "delete": {
diff --git a/src/commands/settings/verify.ts b/src/commands/settings/verify.ts
index e2318fc..05c4764 100644
--- a/src/commands/settings/verify.ts
+++ b/src/commands/settings/verify.ts
@@ -82,7 +82,7 @@
         if (i.isButton()) {
             switch (i.customId) {
                 case "save": {
-                    client.database.guilds.write(interaction.guild.id, { verify: data });
+                    await client.database.guilds.write(interaction.guild.id, { verify: data });
                     config = await client.database.guilds.read(interaction.guild.id);
                     data = Object.assign({}, config.verify);
                     await client.memory.forceUpdate(interaction.guild.id);
diff --git a/src/commands/user/role.ts b/src/commands/user/role.ts
index 74b6c41..9a0a462 100644
--- a/src/commands/user/role.ts
+++ b/src/commands/user/role.ts
@@ -129,7 +129,7 @@
             continue;
         }
 
-        i.deferUpdate();
+        await i.deferUpdate();
         if (i.isButton()) {
             switch (i.customId) {
                 case "roleSave": {
diff --git a/src/commands/user/track.ts b/src/commands/user/track.ts
index 19b9da2..1ce05ee 100644
--- a/src/commands/user/track.ts
+++ b/src/commands/user/track.ts
@@ -97,7 +97,12 @@
                 selected.length
             } roles from this track. `;
             conflictDropdown = [];
-            if (roles.get(selected[0]!)!.position < memberRoles.highest.position || managed) {
+            const yourRoles = guild.members.cache.get(interaction.user.id)!.roles;
+            if (
+                (roles.get(selected[0]!)!.position < yourRoles.highest.position &&
+                    roles.get(selected[0]!)!.position < guild.members.me!.roles.highest.position!) ||
+                managed
+            ) {
                 generated +=
                     "In order to promote or demote this user, you must select which role the member should keep.";
                 selected.forEach((role) => {
@@ -115,8 +120,13 @@
                         .setPlaceholder("Select a role to keep")
                 ];
             } else {
-                generated +=
-                    "You don't have permission to manage one or more of the users roles, and therefore can't select one to keep.";
+                if (roles.get(selected[0]!)!.position >= yourRoles.highest.position) {
+                    generated +=
+                        "You don't have permission to manage one or more of the user's roles, and therefore can't select one to keep.";
+                } else {
+                    generated +=
+                        "I don't have permission to manage one or more of the user's roles, and therefore can't select one to keep.";
+                }
             }
         } else {
             currentRoleIndex = selected.length === 0 ? -1 : data.track.indexOf(selected[0]!.toString());
@@ -178,11 +188,12 @@
             timedOut = true;
             continue;
         }
-        component.deferUpdate();
+        await component.deferUpdate();
         if (component.customId === "conflict") {
             const rolesToRemove = selected.filter(
                 (role) => role !== (component as StringSelectMenuInteraction).values[0]
             );
+
             await member.roles.remove(rolesToRemove);
         } else if (component.customId === "promote") {
             if (
diff --git a/src/commands/verify.ts b/src/commands/verify.ts
index 0dd8b24..4bbe50f 100644
--- a/src/commands/verify.ts
+++ b/src/commands/verify.ts
@@ -5,7 +5,7 @@
 const command = new SlashCommandBuilder().setName("verify").setDescription("Get verified in the server");
 
 const callback = async (interaction: CommandInteraction): Promise<void> => {
-    verify(interaction);
+    await verify(interaction);
 };
 
 export { command };
diff --git a/src/config/emojis.json b/src/config/emojis.json
deleted file mode 100644
index 585934d..0000000
--- a/src/config/emojis.json
+++ /dev/null
@@ -1,402 +0,0 @@
-{
-    "NUCLEUS": {
-        "LOGO": "953040840945721385",
-        "PREMIUMACTIVATE": "a1067536222764925068",
-        "PREMIUM": "1067928702027042876",
-        "LOADING": "a946346549271732234",
-        "INFO": {
-            "HELP": "751751467014029322",
-            "ABOUT": "751762088346517504",
-            "COMMANDS": "751762088229339136",
-            "SUPPORT": "751762087780286495"
-        },
-        "COMMANDS": {
-            "RAID": "777143043711172608",
-            "LOCK": "776848800995868682",
-            "IGNORE": "777520659270074389"
-        }
-    },
-    "ICONS": {
-        "ADD": "826823514904330251",
-        "REMOVE": "826823515268186152",
-        "EDIT": "989911820267577366",
-        "HISTORY": "989911933069168690",
-        "FILTER": "990242059451514902",
-        "ATTACHMENT": "997570687193587812",
-        "LOGGING": "999613304446144562",
-        "SAVE": "1065722246322200586",
-        "REORDER": "1069323453909454890",
-        "PUBLISH": "1081691380004421743",
-        "NOTIFY": {
-            "ON": "1000726394579464232",
-            "OFF": "1078058136092541008"
-        },
-        "OPP": {
-            "ADD": "837355918831124500",
-            "REMOVE": "837355918420869162"
-        },
-        "CHANNEL": {
-            "GUILD_TEXT": "990209996182679632",
-            "GUILD_TEXT_NSFW": "990216363526221824",
-            "GUILD_VOICE": "990213162697637969",
-            "GUILD_VOICE_NSFW": "990216017244463124",
-            "GUILD_STORE": "853668786925469706",
-            "GUILD_NEWS": "853668786493063169",
-            "GUILD_NEWS_NSFW": "990216028300673094",
-            "GUILD_STAGE_VOICE": "853668786842763294",
-            "THREAD_CHANNEL": "990210005108158514",
-            "THREAD_PIPE": "990213168183779348",
-            "RULES": "990213153080115250",
-            "FORUM": "1061706437526552716",
-            "CATEGORY": "1064943289708597348"
-        },
-        "FLAGS": {
-            "RED": "1082719687219101800",
-            "YELLOW": "1082719684060794890",
-            "GREEN": "1082719681326108763",
-            "BLUE": "1082719679161843734",
-            "PURPLE": "1082719686292156628",
-            "GRAY": "1082719682492125337"
-        }
-    },
-    "CONTROL": {
-        "TICK": "947441964234702849",
-        "REDTICK": "999612396727439370",
-        "CROSS": "947441948543815720",
-        "BLOCKCROSS": "952261738349330493",
-        "BLOCKTICK": "991805475777695855",
-        "LEFT": "947441951148486728",
-        "RIGHT": "947441957473488916",
-        "UP": "963409197293273108",
-        "DOWN": "963409199549796352",
-        "DOWNLOAD": "947959513032585236",
-        "TICKET": "973253514488860683",
-        "MENU": "976580327835320410",
-        "PILL": {
-            "TICK": "753314339082993832",
-            "CROSS": "753314339389309100"
-        }
-    },
-    "STATUS": {
-        "ONLINE": "729064530084102166",
-        "IDLE": "729064531577536582",
-        "DND": "729064531057311886",
-        "STREAMING": "729764055082074153",
-        "OFFLINE": "729064531271221289"
-    },
-    "CHANNEL": {
-        "TEXT": {
-            "CREATE": "729066924943737033",
-            "EDIT": "951957316117360640",
-            "DELETE": "729064529211686922"
-        },
-        "VOICE": {
-            "CREATE": "729064530830950530",
-            "EDIT": "951957316071223336",
-            "DELETE": "729064530981683200"
-        },
-        "CATEGORY": {
-            "CREATE": "787987508465238026",
-            "EDIT": "787987508565770300",
-            "DELETE": "787987508507967488"
-        },
-        "PURGE": {
-            "RED": "729064530797133875",
-            "GREEN": "947443645391441940"
-        },
-        "TITLEUPDATE": "729763053620691044",
-        "TOPICUPDATE": "729763053477953536",
-        "SLOWMODE": {
-            "ON": "973616021304913950",
-            "OFF": "777138171447869480"
-        },
-        "NSFW": {
-            "ON": "729064531208175736",
-            "OFF": "729381430991388752"
-        }
-    },
-    "MEMBER": {
-        "JOIN": "729066519337762878",
-        "LEAVE": "729064531170558575",
-        "BOT": {
-            "JOIN": "729064528666689587",
-            "LEAVE": "729064528998039633"
-        },
-        "KICK": "729263536785850458",
-        "BAN": "729263536643112991",
-        "UNBAN": "729263536840114216"
-    },
-    "INVITE": {
-        "CREATE": "729064529274601482",
-        "DELETE": "729064531103580230"
-    },
-    "WEBHOOK": {
-        "CREATE": "752070251906203679",
-        "UPDATE": "752073772823216191",
-        "DELETE": "752070251948146768"
-    },
-    "MESSAGE": {
-        "CREATE": "751762088229339136",
-        "EDIT": "729065958584614925",
-        "DELETE": "729064530432360461",
-        "PIN": "729064530755190894",
-        "REACTION": {
-            "ADD": "",
-            "REMOVE": "",
-            "CLEAR": "729064531468353606"
-        },
-        "PING": {
-            "MASS": "729620608408879124",
-            "EVERYONE": "729064531073957909",
-            "ROLE": "729263536915742770"
-        }
-    },
-    "PUNISH": {
-        "WARN": {
-            "RED": "947433493384806430",
-            "YELLOW": "729764054897524768",
-            "GREEN": "947433504076091424"
-        },
-        "KICK": {
-            "RED": "729764053794422896",
-            "YELLOW": "947429333289562132",
-            "GREEN": "947428786692042764"
-        },
-        "BAN": {
-            "RED": "729764053861400637",
-            "YELLOW": "729764053941223476",
-            "GREEN": "947421674364629022"
-        },
-        "UNBAN": {
-            "RED": "972511610885255259",
-            "YELLOW": "972511620343414794",
-            "GREEN": "729263536840114216"
-        },
-        "MUTE": {
-            "RED": "947555098974883910",
-            "YELLOW": "729764053865463840",
-            "GREEN": "947555107980066866"
-        },
-        "SOFTBAN": "729764053941223476",
-        "VOICEMUTE": "729764054855450697",
-        "CLEARHISTORY": "729764062270980096",
-        "NICKNAME": {
-            "RED": "959762533101731980",
-            "YELLOW": "729064531019694090",
-            "GREEN": "959762533072392202"
-        }
-    },
-    "BADGES": {
-        "NUCLEUSDEVELOPER": "957722888360853595",
-        "CLICKSDEVELOPER": "957722888314683462",
-        "BOT": "776375959108190239",
-        "BOOSTER": "775783766131605545",
-        "HypeSquadOnlineHouse1": "775783765930016789",
-        "HypeSquadOnlineHouse2": "775783766152577095",
-        "HypeSquadOnlineHouse3": "775783766303440937",
-        "Hypesquad": "775783766194126908",
-        "PremiumEarlySupporter": "775783766055452693",
-        "BugHunterLevel1": "775783766252847154",
-        "BugHunterLevel2": "775783766130950234",
-        "Partner": "775783766178005033",
-        "Staff": "775783766383788082",
-        "VerifiedDeveloper": "775783766425600060",
-        "Quarantined": "1059794708638994474",
-        "Spammer": "1059794708638994474",
-        "ActiveDeveloper": "1059795592966053918"
-    },
-    "VOICE": {
-        "CONNECT": "784785219391193138",
-        "CHANGE": "784785219353968670",
-        "LEAVE": "784785219432480808",
-        "MUTE": "784785219613360149",
-        "UNMUTE": "784785219441524766",
-        "DEAFEN": "784785219424747550",
-        "UNDEAFEN": "784785219324346378",
-        "STREAM": {
-            "START": "853519659775819787",
-            "STOP": "853519660116213780"
-        },
-        "VIDEO": {
-            "START": "853519659945295873",
-            "STOP": "853519660116738078"
-        }
-    },
-    "SETTINGS": {
-        "STATS": {
-            "GREEN": "752214059159650396",
-            "RED": "1065677252630675556"
-        }
-    },
-    "GUILD": {
-        "RED": "959779988264079361",
-        "YELLOW": "729763053352124529",
-        "GREEN": "959779988503154698",
-        "EMOJI": {
-            "CREATE": "953035168115982437",
-            "EDIT": "729066518549233795",
-            "DELETE": "953035210121953320"
-        },
-        "SETTINGS": {
-            "GREEN": "752570111063228507",
-            "RED": "1068607393728049253"
-        },
-        "ICONCHANGE": "729763053612302356",
-        "TICKET": {
-            "OPEN": "853245836331188264",
-            "CLOSE": "853580122506133505",
-            "ARCHIVED": "853580122636025856"
-        },
-        "ROLES": {
-            "CREATE": "729064530763579413",
-            "DELETE": "729064530885476392",
-            "EDIT": "776109664793919489",
-            "MEMBERS": "752570111281594509",
-            "MESSAGES": "752570111373606942",
-            "VOICE": "752570111088525354"
-        }
-    },
-    "MOD": {
-        "IMAGES": {
-            "SWEARING": "730438422627614810",
-            "INVISIBLE": "730438422690398238",
-            "TOOBIG": "730438422921084998",
-            "TOOSMALL": "730438422921216150"
-        },
-        "SWEARING": "730438422816096377",
-        "SPAM": "730438422853845042"
-    },
-    "NUMBERS": [
-        {
-            "NORMAL": "753259024404840529",
-            "GREEN": "753312608378945648",
-            "RED": "753312608890650664"
-        },
-        {
-            "NORMAL": "753259025990418515",
-            "GREEN": "753312608550912112",
-            "RED": "753312609075462246"
-        },
-        {
-            "NORMAL": "753259024409034896",
-            "GREEN": "753312608513294366",
-            "RED": "753312608680935446"
-        },
-        {
-            "NORMAL": "753259024358703205",
-            "GREEN": "753312608815284426",
-            "RED": "753312609377320966"
-        },
-        {
-            "NORMAL": "753259024555835513",
-            "GREEN": "753312608735461457",
-            "RED": "753312609255686223"
-        },
-        {
-            "NORMAL": "753259024744579283",
-            "GREEN": "753312608630604017",
-            "RED": "753312609138376777"
-        },
-        {
-            "NORMAL": "753259024354639994",
-            "GREEN": "753312608656031806",
-            "RED": "753312609465270412"
-        },
-        {
-            "NORMAL": "753259024530800661",
-            "GREEN": "753312608718815322",
-            "RED": "753312609104822313"
-        },
-        {
-            "NORMAL": "753259024895574037",
-            "GREEN": "753312608790249646",
-            "RED": "753312609477984319"
-        },
-        {
-            "NORMAL": "753259024681533553",
-            "GREEN": "753312608899170365",
-            "RED": "753312609557545089"
-        }
-    ],
-    "BOTS": {
-        "GPS": "878919163937185803",
-        "NUCLEUS": "878919163597439016",
-        "CLICKSFORMS": "878919163337388073",
-        "CASTAWAY": "878919164255944726",
-        "CMPING": "878919164125929502",
-        "HOOKY": "878919164121731082"
-    },
-    "CFSERVICE": {
-        "VERIFIED": "881984571242053642",
-        "UNVERIFIED": "881984571258847232"
-    },
-    "TICKETS": {
-        "SUPPORT": "952295894370369587",
-        "REPORT": "952295894437482537",
-        "QUESTION": "952295894403907645",
-        "ISSUE": "952295894412316672",
-        "SUGGESTION": "952295894399725588",
-        "OTHER": "952295894445883502"
-    },
-    "TRACKS": {
-        "ICON": "963170616444334171",
-        "HORIZONTAL": {
-            "LEFT": {
-                "ACTIVE": "963121920038035506",
-                "INACTIVE": "963121944239153242"
-            },
-            "MIDDLE": {
-                "ACTIVE": "963121925893263420",
-                "INACTIVE": "963121949796597870"
-            },
-            "RIGHT": {
-                "ACTIVE": "963121933384302602",
-                "INACTIVE": "963121956125831168"
-            }
-        },
-        "VERTICAL": {
-            "TOP": {
-                "ACTIVE": "963122664648630293",
-                "INACTIVE": "963122659862917140",
-                "GRAY": {
-                    "ACTIVE": "963123505052934144",
-                    "INACTIVE": "963123495221469194"
-                }
-            },
-            "MIDDLE": {
-                "ACTIVE": "963122679332880384",
-                "INACTIVE": "963122673246937199",
-                "GRAY": {
-                    "ACTIVE": "963123517702955018",
-                    "INACTIVE": "963123511927390329"
-                }
-            },
-            "BOTTOM": {
-                "ACTIVE": "963122691752218624",
-                "INACTIVE": "963122685691453552",
-                "GRAY": {
-                    "ACTIVE": "963123529988059187",
-                    "INACTIVE": "963123523742748742"
-                }
-            }
-        },
-        "SINGLE": {
-            "ACTIVE": "963361162215424060",
-            "INACTIVE": "963361431758176316",
-            "GRAY": {
-                "ACTIVE": "963361204695334943",
-                "INACTIVE": "963361200828198952"
-            }
-        }
-    },
-    "COLORS": {
-        "RED": "875822912802803754",
-        "ORANGE": "875822913104785418",
-        "YELLOW": "875822913079611402",
-        "GREEN": "875822913213841418",
-        "BLUE": "875822912777637889",
-        "PURPLE": "875822913213841419",
-        "PINK": "875822913088020541",
-        "GRAY": "875822913117368340"
-    }
-}
diff --git a/src/config/emojis.ts b/src/config/emojis.ts
new file mode 100644
index 0000000..b7ed91a
--- /dev/null
+++ b/src/config/emojis.ts
@@ -0,0 +1,402 @@
+export default {
+    NUCLEUS: {
+        LOGO: "953040840945721385",
+        PREMIUMACTIVATE: "a1067536222764925068",
+        PREMIUM: "1067928702027042876",
+        LOADING: "a946346549271732234",
+        INFO: {
+            HELP: "751751467014029322",
+            ABOUT: "751762088346517504",
+            COMMANDS: "751762088229339136",
+            SUPPORT: "751762087780286495"
+        },
+        COMMANDS: {
+            RAID: "777143043711172608",
+            LOCK: "776848800995868682",
+            IGNORE: "777520659270074389"
+        }
+    },
+    ICONS: {
+        ADD: "826823514904330251",
+        REMOVE: "826823515268186152",
+        EDIT: "989911820267577366",
+        HISTORY: "989911933069168690",
+        FILTER: "990242059451514902",
+        ATTACHMENT: "997570687193587812",
+        LOGGING: "999613304446144562",
+        SAVE: "1065722246322200586",
+        REORDER: "1069323453909454890",
+        PUBLISH: "1081691380004421743",
+        NOTIFY: {
+            ON: "1000726394579464232",
+            OFF: "1078058136092541008"
+        },
+        OPP: {
+            ADD: "837355918831124500",
+            REMOVE: "837355918420869162"
+        },
+        CHANNEL: {
+            GUILD_TEXT: "990209996182679632",
+            GUILD_TEXT_NSFW: "990216363526221824",
+            GUILD_VOICE: "990213162697637969",
+            GUILD_VOICE_NSFW: "990216017244463124",
+            GUILD_STORE: "853668786925469706",
+            GUILD_NEWS: "853668786493063169",
+            GUILD_NEWS_NSFW: "990216028300673094",
+            GUILD_STAGE_VOICE: "853668786842763294",
+            THREAD_CHANNEL: "990210005108158514",
+            THREAD_PIPE: "990213168183779348",
+            RULES: "990213153080115250",
+            FORUM: "1061706437526552716",
+            CATEGORY: "1064943289708597348"
+        },
+        FLAGS: {
+            RED: "1082719687219101800",
+            YELLOW: "1082719684060794890",
+            GREEN: "1082719681326108763",
+            BLUE: "1082719679161843734",
+            PURPLE: "1082719686292156628",
+            GRAY: "1082719682492125337"
+        }
+    },
+    CONTROL: {
+        TICK: "947441964234702849",
+        REDTICK: "999612396727439370",
+        CROSS: "947441948543815720",
+        BLOCKCROSS: "952261738349330493",
+        BLOCKTICK: "991805475777695855",
+        LEFT: "947441951148486728",
+        RIGHT: "947441957473488916",
+        UP: "963409197293273108",
+        DOWN: "963409199549796352",
+        DOWNLOAD: "947959513032585236",
+        TICKET: "973253514488860683",
+        MENU: "976580327835320410",
+        PILL: {
+            TICK: "753314339082993832",
+            CROSS: "753314339389309100"
+        }
+    },
+    STATUS: {
+        ONLINE: "729064530084102166",
+        IDLE: "729064531577536582",
+        DND: "729064531057311886",
+        STREAMING: "729764055082074153",
+        OFFLINE: "729064531271221289"
+    },
+    CHANNEL: {
+        TEXT: {
+            CREATE: "729066924943737033",
+            EDIT: "951957316117360640",
+            DELETE: "729064529211686922"
+        },
+        VOICE: {
+            CREATE: "729064530830950530",
+            EDIT: "951957316071223336",
+            DELETE: "729064530981683200"
+        },
+        CATEGORY: {
+            CREATE: "787987508465238026",
+            EDIT: "787987508565770300",
+            DELETE: "787987508507967488"
+        },
+        PURGE: {
+            RED: "729064530797133875",
+            GREEN: "947443645391441940"
+        },
+        TITLEUPDATE: "729763053620691044",
+        TOPICUPDATE: "729763053477953536",
+        SLOWMODE: {
+            ON: "973616021304913950",
+            OFF: "777138171447869480"
+        },
+        NSFW: {
+            ON: "729064531208175736",
+            OFF: "729381430991388752"
+        }
+    },
+    MEMBER: {
+        JOIN: "729066519337762878",
+        LEAVE: "729064531170558575",
+        BOT: {
+            JOIN: "729064528666689587",
+            LEAVE: "729064528998039633"
+        },
+        KICK: "729263536785850458",
+        BAN: "729263536643112991",
+        UNBAN: "729263536840114216"
+    },
+    INVITE: {
+        CREATE: "729064529274601482",
+        DELETE: "729064531103580230"
+    },
+    WEBHOOK: {
+        CREATE: "752070251906203679",
+        UPDATE: "752073772823216191",
+        DELETE: "752070251948146768"
+    },
+    MESSAGE: {
+        CREATE: "751762088229339136",
+        EDIT: "729065958584614925",
+        DELETE: "729064530432360461",
+        PIN: "729064530755190894",
+        REACTION: {
+            ADD: "",
+            REMOVE: "",
+            CLEAR: "729064531468353606"
+        },
+        PING: {
+            MASS: "729620608408879124",
+            EVERYONE: "729064531073957909",
+            ROLE: "729263536915742770"
+        }
+    },
+    PUNISH: {
+        WARN: {
+            RED: "947433493384806430",
+            YELLOW: "729764054897524768",
+            GREEN: "947433504076091424"
+        },
+        KICK: {
+            RED: "729764053794422896",
+            YELLOW: "947429333289562132",
+            GREEN: "947428786692042764"
+        },
+        BAN: {
+            RED: "729764053861400637",
+            YELLOW: "729764053941223476",
+            GREEN: "947421674364629022"
+        },
+        UNBAN: {
+            RED: "972511610885255259",
+            YELLOW: "972511620343414794",
+            GREEN: "729263536840114216"
+        },
+        MUTE: {
+            RED: "947555098974883910",
+            YELLOW: "729764053865463840",
+            GREEN: "947555107980066866"
+        },
+        SOFTBAN: "729764053941223476",
+        VOICEMUTE: "729764054855450697",
+        CLEARHISTORY: "729764062270980096",
+        NICKNAME: {
+            RED: "959762533101731980",
+            YELLOW: "729064531019694090",
+            GREEN: "959762533072392202"
+        }
+    },
+    BADGES: {
+        NUCLEUSDEVELOPER: "957722888360853595",
+        CLICKSDEVELOPER: "957722888314683462",
+        BOT: "776375959108190239",
+        BOOSTER: "775783766131605545",
+        HypeSquadOnlineHouse1: "775783765930016789",
+        HypeSquadOnlineHouse2: "775783766152577095",
+        HypeSquadOnlineHouse3: "775783766303440937",
+        Hypesquad: "775783766194126908",
+        PremiumEarlySupporter: "775783766055452693",
+        BugHunterLevel1: "775783766252847154",
+        BugHunterLevel2: "775783766130950234",
+        Partner: "775783766178005033",
+        Staff: "775783766383788082",
+        VerifiedDeveloper: "775783766425600060",
+        Quarantined: "1059794708638994474",
+        Spammer: "1059794708638994474",
+        ActiveDeveloper: "1059795592966053918"
+    },
+    VOICE: {
+        CONNECT: "784785219391193138",
+        CHANGE: "784785219353968670",
+        LEAVE: "784785219432480808",
+        MUTE: "784785219613360149",
+        UNMUTE: "784785219441524766",
+        DEAFEN: "784785219424747550",
+        UNDEAFEN: "784785219324346378",
+        STREAM: {
+            START: "853519659775819787",
+            STOP: "853519660116213780"
+        },
+        VIDEO: {
+            START: "853519659945295873",
+            STOP: "853519660116738078"
+        }
+    },
+    SETTINGS: {
+        STATS: {
+            GREEN: "752214059159650396",
+            RED: "1065677252630675556"
+        }
+    },
+    GUILD: {
+        RED: "959779988264079361",
+        YELLOW: "729763053352124529",
+        GREEN: "959779988503154698",
+        EMOJI: {
+            CREATE: "953035168115982437",
+            EDIT: "729066518549233795",
+            DELETE: "953035210121953320"
+        },
+        SETTINGS: {
+            GREEN: "752570111063228507",
+            RED: "1068607393728049253"
+        },
+        ICONCHANGE: "729763053612302356",
+        TICKET: {
+            OPEN: "853245836331188264",
+            CLOSE: "853580122506133505",
+            ARCHIVED: "853580122636025856"
+        },
+        ROLES: {
+            CREATE: "729064530763579413",
+            DELETE: "729064530885476392",
+            EDIT: "776109664793919489",
+            MEMBERS: "752570111281594509",
+            MESSAGES: "752570111373606942",
+            VOICE: "752570111088525354"
+        }
+    },
+    MOD: {
+        IMAGES: {
+            SWEARING: "730438422627614810",
+            INVISIBLE: "730438422690398238",
+            TOOBIG: "730438422921084998",
+            TOOSMALL: "730438422921216150"
+        },
+        SWEARING: "730438422816096377",
+        SPAM: "730438422853845042"
+    },
+    NUMBERS: [
+        {
+            NORMAL: "753259024404840529",
+            GREEN: "753312608378945648",
+            RED: "753312608890650664"
+        },
+        {
+            NORMAL: "753259025990418515",
+            GREEN: "753312608550912112",
+            RED: "753312609075462246"
+        },
+        {
+            NORMAL: "753259024409034896",
+            GREEN: "753312608513294366",
+            RED: "753312608680935446"
+        },
+        {
+            NORMAL: "753259024358703205",
+            GREEN: "753312608815284426",
+            RED: "753312609377320966"
+        },
+        {
+            NORMAL: "753259024555835513",
+            GREEN: "753312608735461457",
+            RED: "753312609255686223"
+        },
+        {
+            NORMAL: "753259024744579283",
+            GREEN: "753312608630604017",
+            RED: "753312609138376777"
+        },
+        {
+            NORMAL: "753259024354639994",
+            GREEN: "753312608656031806",
+            RED: "753312609465270412"
+        },
+        {
+            NORMAL: "753259024530800661",
+            GREEN: "753312608718815322",
+            RED: "753312609104822313"
+        },
+        {
+            NORMAL: "753259024895574037",
+            GREEN: "753312608790249646",
+            RED: "753312609477984319"
+        },
+        {
+            NORMAL: "753259024681533553",
+            GREEN: "753312608899170365",
+            RED: "753312609557545089"
+        }
+    ],
+    BOTS: {
+        GPS: "878919163937185803",
+        NUCLEUS: "878919163597439016",
+        CLICKSFORMS: "878919163337388073",
+        CASTAWAY: "878919164255944726",
+        CMPING: "878919164125929502",
+        HOOKY: "878919164121731082"
+    },
+    CFSERVICE: {
+        VERIFIED: "881984571242053642",
+        UNVERIFIED: "881984571258847232"
+    },
+    TICKETS: {
+        SUPPORT: "952295894370369587",
+        REPORT: "952295894437482537",
+        QUESTION: "952295894403907645",
+        ISSUE: "952295894412316672",
+        SUGGESTION: "952295894399725588",
+        OTHER: "952295894445883502"
+    },
+    TRACKS: {
+        ICON: "963170616444334171",
+        HORIZONTAL: {
+            LEFT: {
+                ACTIVE: "963121920038035506",
+                INACTIVE: "963121944239153242"
+            },
+            MIDDLE: {
+                ACTIVE: "963121925893263420",
+                INACTIVE: "963121949796597870"
+            },
+            RIGHT: {
+                ACTIVE: "963121933384302602",
+                INACTIVE: "963121956125831168"
+            }
+        },
+        VERTICAL: {
+            TOP: {
+                ACTIVE: "963122664648630293",
+                INACTIVE: "963122659862917140",
+                GRAY: {
+                    ACTIVE: "963123505052934144",
+                    INACTIVE: "963123495221469194"
+                }
+            },
+            MIDDLE: {
+                ACTIVE: "963122679332880384",
+                INACTIVE: "963122673246937199",
+                GRAY: {
+                    ACTIVE: "963123517702955018",
+                    INACTIVE: "963123511927390329"
+                }
+            },
+            BOTTOM: {
+                ACTIVE: "963122691752218624",
+                INACTIVE: "963122685691453552",
+                GRAY: {
+                    ACTIVE: "963123529988059187",
+                    INACTIVE: "963123523742748742"
+                }
+            }
+        },
+        SINGLE: {
+            ACTIVE: "963361162215424060",
+            INACTIVE: "963361431758176316",
+            GRAY: {
+                ACTIVE: "963361204695334943",
+                INACTIVE: "963361200828198952"
+            }
+        }
+    },
+    COLORS: {
+        RED: "875822912802803754",
+        ORANGE: "875822913104785418",
+        YELLOW: "875822913079611402",
+        GREEN: "875822913213841418",
+        BLUE: "875822912777637889",
+        PURPLE: "875822913213841419",
+        PINK: "875822913088020541",
+        GRAY: "875822913117368340"
+    }
+}
diff --git a/src/config/format.ts b/src/config/format.ts
index 0560796..042d173 100644
--- a/src/config/format.ts
+++ b/src/config/format.ts
@@ -1,7 +1,7 @@
 import fs from "fs";
 import * as readLine from "node:readline/promises";
 
-const defaultDict: Record<string, string | string[] | boolean | Record<string, string>> = {
+const defaultDict: Record<string, string | string[] | boolean | Record<string, string | number | undefined>> = {
     developmentToken: "Your development bot token (Used for testing in one server, rather than production)",
     developmentGuildID: "Your development guild ID",
     enableDevelopment: true,
@@ -26,10 +26,16 @@
         authSource: ""
     },
     baseUrl: "Your website where buttons such as Verify and Role menu will link to, e.g. https://example.com/",
-    pastebinApiKey: "An API key for pastebin (optional)",
-    pastebinUsername: "Your pastebin username (optional)",
-    pastebinPassword: "Your pastebin password (optional)",
-    rapidApiKey: "Your RapidAPI key (optional), used for Unscan"
+    clamAVSocket: "Your ClamAV socket file (optional)",
+    clamAVHost: "Your ClamAV host (optional)",
+    clamAVPort: "Your ClamAV port (optional)",
+    clamav: {
+        socket: "",
+        host: "",
+        port: 0
+    },
+    githubPAT: "Your GitHub Personal Access Token (optional)",
+    suggestionChannel: "Your suggestion channel ID (optional)"
 };
 
 const readline = readLine.createInterface({
@@ -111,6 +117,9 @@
                     case "mongoOptions": {
                         break;
                     }
+                    case "clamav": {
+                        break;
+                    }
                     default: {
                         json[key] = await getInput(`\x1b[36m${key} \x1b[0m(\x1b[35m${defaultDict[key]}\x1b[0m) > `);
                     }
@@ -122,22 +131,9 @@
     }
     if (walkthrough && !(json["mongoUrl"] ?? false)) json["mongoUrl"] = "mongodb://127.0.0.1:27017";
     if (!((json["baseUrl"] as string | undefined) ?? "").endsWith("/")) (json["baseUrl"] as string) += "/";
-    let hosts;
-    try {
-        hosts = fs.readFileSync("/etc/hosts", "utf8").toString().split("\n");
-    } catch (e) {
-        return console.log(
-            "\x1b[31m⚠ No /etc/hosts found. Please ensure the file exists and is readable. (Windows is not supported, Mac and Linux users should not experience this error)"
-        );
-    }
-    let localhost: string | undefined = hosts.find((line) => line.split(" ")[1] === "localhost");
-    if (localhost) {
-        localhost = localhost.split(" ")[0];
-    } else {
-        localhost = "127.0.0.1";
-    }
-    json["mongoUrl"] = (json["mongoUrl"]! as string).replace("localhost", localhost!);
-    json["baseUrl"] = (json["baseUrl"]! as string).replace("localhost", localhost!);
+    const localhost = "127.0.0.1";
+    json["mongoUrl"] = (json["mongoUrl"]! as string).replace("localhost", localhost);
+    json["baseUrl"] = (json["baseUrl"]! as string).replace("localhost", localhost);
     json["mongoOptions"] = {
         username: json["username"] as string,
         password: json["password"] as string,
@@ -145,6 +141,11 @@
         host: json["host"] as string,
         authSource: json["authSource"] as string
     };
+    json["clamav"] = {
+        socket: json["clamAVSocket"] as string | undefined,
+        host: json["clamAVHost"] as string | undefined,
+        port: json["clamAVPort"] as number | undefined
+    };
 
     fs.writeFileSync("./src/config/main.ts", "export default " + JSON.stringify(json, null, 4) + ";");
 
diff --git a/src/config/main.d.ts b/src/config/main.d.ts
index 99c460d..6c610e0 100644
--- a/src/config/main.d.ts
+++ b/src/config/main.d.ts
@@ -18,7 +18,13 @@
         authSource: string;
     };
     baseUrl: string;
-    rapidApiKey: string;
+    clamav: {
+        socket?: string;
+        host?: string;
+        port?: number;
+    };
+    githubPAT: string;
+    suggestionChannel: string;
 };
 
 export default config;
diff --git a/src/context/messages/purgeto.ts b/src/context/messages/purgeto.ts
index 4f0ea1e..a75a281 100644
--- a/src/context/messages/purgeto.ts
+++ b/src/context/messages/purgeto.ts
@@ -19,14 +19,14 @@
 async function waitForButton(m: Discord.Message, member: Discord.GuildMember): Promise<boolean> {
     let component;
     try {
-        component = m.awaitMessageComponent({
+        component = await m.awaitMessageComponent({
             time: 200000,
             filter: (i) => i.user.id === member.id && i.channel!.id === m.channel.id && i.message.id === m.id
         });
     } catch (e) {
         return false;
     }
-    (await component).deferUpdate();
+    await component.deferUpdate();
     return true;
 }
 
@@ -210,7 +210,7 @@
             guild: interaction.guild!.id
         }
     };
-    log(data);
+    await log(data);
     const messages: Message[] = deleted
         .map((m) => m)
         .filter((m) => m instanceof Message)
diff --git a/src/context/users/userinfo.ts b/src/context/users/userinfo.ts
index 7a75754..9c7433f 100644
--- a/src/context/users/userinfo.ts
+++ b/src/context/users/userinfo.ts
@@ -4,7 +4,6 @@
 const command = new ContextMenuCommandBuilder().setName("User info");
 
 const callback = async (interaction: UserContextMenuCommandInteraction) => {
-    console.log("callback");
     const guild = interaction.guild!;
     let member = interaction.targetMember;
     if (!member) member = await guild.members.fetch(interaction.targetId);
@@ -12,7 +11,6 @@
 };
 
 const check = async (_interaction: UserContextMenuCommandInteraction) => {
-    console.log("check");
     return true;
 };
 
diff --git a/src/events/channelCreate.ts b/src/events/channelCreate.ts
index 90a7f6d..8fd6b35 100644
--- a/src/events/channelCreate.ts
+++ b/src/events/channelCreate.ts
@@ -81,5 +81,5 @@
             guild: channel.guild.id
         }
     };
-    log(data);
+    await log(data);
 }
diff --git a/src/events/channelDelete.ts b/src/events/channelDelete.ts
index 8dffd38..b79c2da 100644
--- a/src/events/channelDelete.ts
+++ b/src/events/channelDelete.ts
@@ -123,5 +123,5 @@
             guild: channel.guild.id
         }
     };
-    log(data);
+    await log(data);
 }
diff --git a/src/events/channelUpdate.ts b/src/events/channelUpdate.ts
index 6491cc9..adfe87f 100644
--- a/src/events/channelUpdate.ts
+++ b/src/events/channelUpdate.ts
@@ -301,5 +301,5 @@
             guild: newChannel.guild.id
         }
     };
-    log(data);
+    await log(data);
 }
diff --git a/src/events/emojiCreate.ts b/src/events/emojiCreate.ts
index 96f7909..873defa 100644
--- a/src/events/emojiCreate.ts
+++ b/src/events/emojiCreate.ts
@@ -30,5 +30,5 @@
             guild: emoji.guild.id
         }
     };
-    log(data);
+    await log(data);
 }
diff --git a/src/events/emojiDelete.ts b/src/events/emojiDelete.ts
index 52822cb..21ade1d 100644
--- a/src/events/emojiDelete.ts
+++ b/src/events/emojiDelete.ts
@@ -31,5 +31,5 @@
             guild: emoji.guild.id
         }
     };
-    log(data);
+    await log(data);
 }
diff --git a/src/events/emojiUpdate.ts b/src/events/emojiUpdate.ts
index 173f5c5..236a799 100644
--- a/src/events/emojiUpdate.ts
+++ b/src/events/emojiUpdate.ts
@@ -37,5 +37,5 @@
             guild: newEmoji.guild.id
         }
     };
-    log(data);
+    await log(data);
 }
diff --git a/src/events/guildBanAdd.ts b/src/events/guildBanAdd.ts
index 6036ddf..c8f3446 100644
--- a/src/events/guildBanAdd.ts
+++ b/src/events/guildBanAdd.ts
@@ -9,7 +9,7 @@
 export async function callback(client: NucleusClient, ban: GuildBan) {
     const { log, isLogging, NucleusColors, entry, renderUser, renderDelta, getAuditLog } = client.logger;
     await statsChannelRemove(ban.user, ban.guild);
-    purgeByUser(ban.user.id, ban.guild.id);
+    await purgeByUser(ban.user.id, ban.guild.id);
     if (!(await isLogging(ban.guild.id, "guildMemberPunish"))) return;
     const auditLog: GuildAuditLogsEntry | undefined = (await getAuditLog(ban.guild, AuditLogEvent.MemberBanAdd)).filter(
         (entry: GuildAuditLogsEntry) => (entry.target! as User).id === ban.user.id
@@ -39,5 +39,5 @@
             guild: ban.guild.id
         }
     };
-    log(data);
+    await log(data);
 }
diff --git a/src/events/guildBanRemove.ts b/src/events/guildBanRemove.ts
index fc916ba..64d9de3 100644
--- a/src/events/guildBanRemove.ts
+++ b/src/events/guildBanRemove.ts
@@ -33,5 +33,5 @@
             guild: ban.guild.id
         }
     };
-    log(data);
+    await log(data);
 }
diff --git a/src/events/guildCreate.ts b/src/events/guildCreate.ts
index ff6c6b2..f5e43a9 100644
--- a/src/events/guildCreate.ts
+++ b/src/events/guildCreate.ts
@@ -5,5 +5,5 @@
 export const event = "guildCreate";
 
 export async function callback(_client: NucleusClient, guild: Guild) {
-    guide(guild);
+    await guide(guild);
 }
diff --git a/src/events/guildMemberUpdate.ts b/src/events/guildMemberUpdate.ts
index 34a52b8..4e512ee 100644
--- a/src/events/guildMemberUpdate.ts
+++ b/src/events/guildMemberUpdate.ts
@@ -12,6 +12,8 @@
         await client.database.premium.checkAllPremium(after);
     }
 
+    if (before.displayAvatarURL({ forceStatic: true }) !== after.displayAvatarURL({ forceStatic: true }))
+        await doMemberChecks(after);
     if (!before.roles.cache.equals(after.roles.cache)) {
         const auditLog = (await getAuditLog(after.guild, AuditLogEvent.MemberRoleUpdate)).filter(
             (entry: GuildAuditLogsEntry) => (entry.target as GuildMember)!.id === after.id
@@ -84,7 +86,7 @@
                 });
             }
             data = Object.assign(data, { list: list });
-            log(data);
+            await log(data);
         }
     }
     const auditLog = (await getAuditLog(after.guild, AuditLogEvent.MemberUpdate)).filter(
@@ -93,7 +95,7 @@
     if (!auditLog) return;
     if (auditLog.executor!.id === client.user!.id) return;
     if (before.nickname !== after.nickname) {
-        doMemberChecks(after, after.guild);
+        await doMemberChecks(after);
         await client.database.history.create(
             "nickname",
             after.guild.id,
@@ -123,7 +125,7 @@
                 guild: after.guild.id
             }
         };
-        log(data);
+        await log(data);
     }
     if (
         (before.communicationDisabledUntilTimestamp ?? 0) < Date.now() &&
@@ -163,12 +165,16 @@
                 guild: after.guild.id
             }
         };
-        log(data);
-        client.database.eventScheduler.schedule("naturalUnmute", after.communicationDisabledUntil?.toISOString()!, {
-            guild: after.guild.id,
-            user: after.id,
-            expires: after.communicationDisabledUntilTimestamp
-        });
+        await log(data);
+        await client.database.eventScheduler.schedule(
+            "naturalUnmute",
+            after.communicationDisabledUntil?.toISOString()!,
+            {
+                guild: after.guild.id,
+                user: after.id,
+                expires: after.communicationDisabledUntilTimestamp
+            }
+        );
     }
     if (
         after.communicationDisabledUntil === null &&
@@ -204,8 +210,8 @@
                 guild: after.guild.id
             }
         };
-        log(data);
-        client.database.eventScheduler.cancel("naturalUnmute", {
+        await log(data);
+        await client.database.eventScheduler.cancel("naturalUnmute", {
             guild: after.guild.id,
             user: after.id,
             expires: before.communicationDisabledUntilTimestamp
diff --git a/src/events/guildUpdate.ts b/src/events/guildUpdate.ts
index c48c82f..27c609d 100644
--- a/src/events/guildUpdate.ts
+++ b/src/events/guildUpdate.ts
@@ -93,5 +93,5 @@
             guild: after.id
         }
     };
-    log(data);
+    await log(data);
 }
diff --git a/src/events/interactionCreate.ts b/src/events/interactionCreate.ts
index 3b0cd62..9d3dceb 100644
--- a/src/events/interactionCreate.ts
+++ b/src/events/interactionCreate.ts
@@ -4,8 +4,18 @@
 import close from "../actions/tickets/delete.js";
 import createTranscript from "../premium/createTranscript.js";
 
-import type { ButtonInteraction, Interaction } from "discord.js";
-import type Discord from "discord.js";
+import {
+    ActionRowBuilder,
+    ButtonBuilder,
+    ButtonInteraction,
+    ButtonStyle,
+    Interaction,
+    InteractionEditReplyOptions,
+    ModalBuilder,
+    ModalSubmitInteraction,
+    TextInputBuilder,
+    TextInputStyle
+} from "discord.js";
 import type { NucleusClient } from "../utils/client.js";
 import EmojiEmbed from "../utils/generateEmojiEmbed.js";
 
@@ -14,6 +24,7 @@
 import { callback as muteCallback, check as muteCheck } from "../commands/mod/mute.js";
 import { callback as nicknameCallback, check as nicknameCheck } from "../commands/mod/nick.js";
 import { callback as warnCallback, check as warnCheck } from "../commands/mod/warn.js";
+import client from "../utils/client.js";
 
 export const event = "interactionCreate";
 
@@ -27,6 +38,13 @@
 
 async function interactionCreate(interaction: Interaction) {
     if (interaction.isButton()) {
+        if (interaction.customId.endsWith(":Suggestion")) {
+            const value =
+                interaction.customId.startsWith("accept") || interaction.customId.startsWith("implement")
+                    ? true
+                    : false;
+            return await modifySuggestion(interaction, value);
+        }
         switch (interaction.customId) {
             case "rolemenu": {
                 return await roleMenu(interaction);
@@ -43,12 +61,6 @@
             case "createtranscript": {
                 return await createTranscript(interaction);
             }
-            case "suggestionAccept": {
-                return await modifySuggestion(interaction, true);
-            }
-            case "suggestionDeny": {
-                return await modifySuggestion(interaction, false);
-            }
         }
         // Mod actions
         if (interaction.customId.startsWith("mod:")) {
@@ -57,27 +69,27 @@
             const member = await interaction.guild?.members.fetch(memberId!);
             switch (action) {
                 case "kick": {
-                    const check = await kickCheck(interaction, false, member);
+                    const check = kickCheck(interaction, false, member);
                     if (check !== true) return await errorMessage(interaction, check!);
                     return await kickCallback(interaction, member);
                 }
                 case "ban": {
-                    const check = await banCheck(interaction, false, member);
+                    const check = banCheck(interaction, false, member);
                     if (check !== true) return await errorMessage(interaction, check!);
                     return await banCallback(interaction, member);
                 }
                 case "mute": {
-                    const check = await muteCheck(interaction, false, member);
+                    const check = muteCheck(interaction, false, member);
                     if (check !== true) return await errorMessage(interaction, check!);
                     return await muteCallback(interaction, member);
                 }
                 case "nickname": {
-                    const check = await nicknameCheck(interaction, false, member);
+                    const check = nicknameCheck(interaction, false, member);
                     if (check !== true) return await errorMessage(interaction, check || "Something went wrong");
                     return await nicknameCallback(interaction, member);
                 }
                 case "warn": {
-                    const check = await warnCheck(interaction, false, member);
+                    const check = warnCheck(interaction, false, member);
                     if (check !== true) return await errorMessage(interaction, check!);
                     return await warnCallback(interaction, member);
                 }
@@ -86,24 +98,138 @@
     }
 }
 
-async function modifySuggestion(interaction: Discord.MessageComponentInteraction, accept: boolean) {
-    const message = await interaction.message;
+const getReason = async (buttonInteraction: ButtonInteraction, prompt: string) => {
+    const modal = new ModalBuilder()
+        .addComponents(
+            new ActionRowBuilder<TextInputBuilder>().addComponents(
+                new TextInputBuilder().setStyle(TextInputStyle.Paragraph).setLabel(prompt).setCustomId("typed")
+            )
+        )
+        .setTitle("Reason")
+        .setCustomId("modal");
+    await buttonInteraction.showModal(modal);
+    let out: ModalSubmitInteraction;
+    try {
+        out = await buttonInteraction.awaitModalSubmit({
+            filter: (i) => i.customId === "modal" && i.user.id === buttonInteraction.user.id,
+            time: 300000
+        });
+    } catch {
+        return null;
+    }
+    await out.deferUpdate();
+    return out.fields.getTextInputValue("typed");
+};
+
+async function modifySuggestion(interaction: ButtonInteraction, accept: boolean) {
+    const message = interaction.message;
     await message.fetch();
     if (message.embeds.length === 0) return;
-    const embed = message.embeds[0];
-    const newcolor = accept ? "Success" : "Danger";
-    const footer = {
-        text: `Suggestion ${accept ? "accepted" : "denied"} by ${interaction.user.tag}`,
-        iconURL: interaction.user.displayAvatarURL()
+    const embed = message.embeds[0]!;
+    const issueNum = embed.footer!.text;
+    if (!issueNum) return;
+    const issue = {
+        owner: "ClicksMinutePer",
+        repo: "Nucleus",
+        issue_number: parseInt(issueNum)
     };
+    let name = "Unknown";
+    const components: InteractionEditReplyOptions["components"] = [];
+    switch (interaction.customId) {
+        case "accept:Suggestion": {
+            name = "Accepted";
+            await interaction.deferUpdate();
+            await client.GitHub.rest.issues.createComment({
+                ...issue,
+                body: "Suggestion accepted by " + interaction.user.tag
+            });
+            components.push(
+                new ActionRowBuilder<ButtonBuilder>().addComponents(
+                    new ButtonBuilder()
+                        .setCustomId("close:Suggestion")
+                        .setLabel("Close")
+                        .setStyle(ButtonStyle.Secondary),
+                    new ButtonBuilder()
+                        .setCustomId("implemented:Suggestion")
+                        .setLabel("Implemented")
+                        .setStyle(ButtonStyle.Secondary)
+                )
+            );
+            break;
+        }
+        case "deny:Suggestion": {
+            name = "Denied";
+            const reason = await getReason(interaction, "Reason for denial");
+            await client.GitHub.rest.issues.createComment({
+                ...issue,
+                body: "Suggestion denied by " + interaction.user.tag + " for reason:\n>" + reason
+            });
+            await client.GitHub.rest.issues.update({ ...issue, state: "closed", state_reason: "not_planned" });
+            // await client.GitHub.rest.issues.lock({...issue, lock_reason: "resolved"})
+            components.push(
+                new ActionRowBuilder<ButtonBuilder>().addComponents(
+                    new ButtonBuilder().setCustomId("lock:Suggestion").setLabel("Lock").setStyle(ButtonStyle.Danger)
+                )
+            );
+            break;
+        }
+        case "close:Suggestion": {
+            name = "Closed";
+            const reason = await getReason(interaction, "Reason for closing");
+            await client.GitHub.rest.issues.createComment({
+                ...issue,
+                body: "Suggestion closed by " + interaction.user.tag + " for reason:\n>" + reason
+            });
+            await client.GitHub.rest.issues.update({ ...issue, state: "closed" });
+            // await client.GitHub.rest.issues.lock({...issue})
+            components.push(
+                new ActionRowBuilder<ButtonBuilder>().addComponents(
+                    new ButtonBuilder().setCustomId("lock:Suggestion").setLabel("Lock").setStyle(ButtonStyle.Danger)
+                )
+            );
+            break;
+        }
+        case "implement:Suggestion": {
+            name = "Implemented";
+            await interaction.deferUpdate();
+            await client.GitHub.rest.issues.createComment({ ...issue, body: "Suggestion implemented" });
+            await client.GitHub.rest.issues.update({ ...issue, state: "closed", state_reason: "completed" });
+            await client.GitHub.rest.issues.lock({ ...issue, lock_reason: "resolved" });
+            break;
+        }
+        case "lock:Suggestion": {
+            name = "Locked";
+            await interaction.deferUpdate();
+            await client.GitHub.rest.issues.lock({ ...issue });
+            break;
+        }
+        case "spam:Suggestion": {
+            name = "Marked as Spam";
+            await interaction.deferUpdate();
+            await client.GitHub.rest.issues.update({ ...issue, state: "closed", state_reason: "not_planned" });
+            await client.GitHub.rest.issues.lock({ ...issue, lock_reason: "spam" });
+            break;
+        }
+    }
+
+    const newcolor = accept ? "Success" : "Danger";
+    const newEmoji = accept ? "ICONS.ADD" : "ICONS.OPP.ADD";
 
     const newEmbed = new EmojiEmbed()
-        .setTitle(embed!.title!)
+        .setEmoji(newEmoji)
+        .setTitle(embed!.title!.replace(/.+> /, ""))
         .setDescription(embed!.description!)
-        .setFooter(footer)
-        .setStatus(newcolor);
+        .setFields({
+            name: name + " by",
+            value: interaction.user.tag
+        })
+        .setStatus(newcolor)
+        .setFooter(embed!.footer);
 
-    await interaction.update({ embeds: [newEmbed], components: [] });
+    await interaction.editReply({
+        embeds: [newEmbed],
+        components: components
+    });
 }
 
 export async function callback(_client: NucleusClient, interaction: Interaction) {
diff --git a/src/events/inviteCreate.ts b/src/events/inviteCreate.ts
index 240965c..6e28d95 100644
--- a/src/events/inviteCreate.ts
+++ b/src/events/inviteCreate.ts
@@ -33,5 +33,5 @@
             guild: invite.guild!.id
         }
     };
-    log(data);
+    await log(data);
 }
diff --git a/src/events/inviteDelete.ts b/src/events/inviteDelete.ts
index 81285c7..89bd226 100644
--- a/src/events/inviteDelete.ts
+++ b/src/events/inviteDelete.ts
@@ -33,5 +33,5 @@
             guild: invite.guild!.id
         }
     };
-    log(data);
+    await log(data);
 }
diff --git a/src/events/memberJoin.ts b/src/events/memberJoin.ts
index 66abe28..55f9ba8 100644
--- a/src/events/memberJoin.ts
+++ b/src/events/memberJoin.ts
@@ -7,9 +7,9 @@
 export const event = "guildMemberAdd";
 
 export async function callback(client: NucleusClient, member: GuildMember) {
-    welcome(member);
-    statsChannelAdd(member.user, member.guild);
-    doMemberChecks(member, member.guild);
+    await welcome(member);
+    await statsChannelAdd(member.user, member.guild);
+    await doMemberChecks(member);
     const { log, isLogging, NucleusColors, entry, renderUser, renderDelta } = client.logger;
     if (!(await isLogging(member.guild.id, "guildMemberUpdate"))) return;
     await client.database.history.create("join", member.guild.id, member.user, null, null);
@@ -33,5 +33,5 @@
             guild: member.guild.id
         }
     };
-    log(data);
+    await log(data);
 }
diff --git a/src/events/memberLeave.ts b/src/events/memberLeave.ts
index e80ea0b..1ca50c6 100644
--- a/src/events/memberLeave.ts
+++ b/src/events/memberLeave.ts
@@ -8,7 +8,7 @@
 
 export async function callback(client: NucleusClient, member: GuildMember) {
     const startTime = Date.now() - 10 * 1000;
-    purgeByUser(member.id, member.guild.id);
+    await purgeByUser(member.id, member.guild.id);
     await statsChannelRemove(member.user, member.guild);
     const { getAuditLog, isLogging, log, NucleusColors, entry, renderUser, renderDelta } = client.logger;
     if (!(await isLogging(member.guild.id, "guildMemberUpdate"))) return;
@@ -95,5 +95,5 @@
             }
         };
     }
-    log(data);
+    await log(data);
 }
diff --git a/src/events/messageCreate.ts b/src/events/messageCreate.ts
index 0281fa1..cc69bf0 100644
--- a/src/events/messageCreate.ts
+++ b/src/events/messageCreate.ts
@@ -23,7 +23,11 @@
         if (message.channel.permissionsFor(message.guild.members.me!)!.has("ManageMessages")) {
             await message.crosspost();
         } else {
-            singleNotify(`Nucleus does not have Manage Messages in <#${message.channel.id}>`, message.guild.id, true);
+            await singleNotify(
+                `Nucleus does not have Manage Messages in <#${message.channel.id}>`,
+                message.guild.id,
+                true
+            );
         }
     }
 
@@ -71,7 +75,7 @@
         if (!config.filters.invite.allowed.channels.includes(message.channel.id)) {
             if (/(?:https?:\/\/)?discord(?:app)?\.(?:com\/invite|gg)\/[a-zA-Z0-9]+\/?/.test(content)) {
                 messageException(message.guild.id, message.channel.id, message.id);
-                message.delete();
+                await message.delete();
                 const data = {
                     meta: {
                         type: "messageDelete",
@@ -101,42 +105,42 @@
         for (const element of fileNames.files) {
             const url = element.url ? element.url : element.local;
             if (
-                /\.(j(pe?g|fif)|a?png|gifv?|w(eb[mp]|av)|mp([34]|eg-\d)|ogg|avi|h\.26(4|5)|cda)$/.test(
+                /\.(jpg|jpeg|png|apng|gif|gifv|webm|webp|mp4|wav|mp3|ogg|jfif|mpeg-\d|avi|h\.264|h\.265)$/.test(
                     url.toLowerCase()
                 )
             ) {
-                // jpg|jpeg|png|apng|gif|gifv|webm|webp|mp4|wav|mp3|ogg|jfif|MPEG-#|avi|h.264|h.265
+                // j(pe?g|fif)|a?png|gifv?|w(eb[mp]|av)|mp([34]|eg-\d)|ogg|avi|h\.26(4|5)
+                // ^no
                 if (
                     config.filters.images.NSFW &&
-                    !(message.channel instanceof ThreadChannel ? message.channel.parent?.nsfw : message.channel.nsfw)
+                    !(message.channel instanceof ThreadChannel ? message.channel.parent?.nsfw : message.channel.nsfw) &&
+                    (await NSFWCheck(element.url))
                 ) {
-                    if (await NSFWCheck(url)) {
-                        messageException(message.guild.id, message.channel.id, message.id);
-                        await message.delete();
-                        const data = {
-                            meta: {
-                                type: "messageDelete",
-                                displayName: "Message Deleted",
-                                calculateType: "autoModeratorDeleted",
-                                color: NucleusColors.red,
-                                emoji: "MESSAGE.DELETE",
-                                timestamp: Date.now()
-                            },
-                            separate: {
-                                start:
-                                    filter +
-                                    " Image detected as NSFW\n\n" +
-                                    (content
-                                        ? `**Message:**\n\`\`\`${content}\`\`\``
-                                        : "**Message:** *Message had no content*")
-                            },
-                            list: list,
-                            hidden: {
-                                guild: message.channel.guild.id
-                            }
-                        };
-                        return log(data);
-                    }
+                    messageException(message.guild.id, message.channel.id, message.id);
+                    await message.delete();
+                    const data = {
+                        meta: {
+                            type: "messageDelete",
+                            displayName: "Message Deleted",
+                            calculateType: "autoModeratorDeleted",
+                            color: NucleusColors.red,
+                            emoji: "MESSAGE.DELETE",
+                            timestamp: Date.now()
+                        },
+                        separate: {
+                            start:
+                                filter +
+                                " Image detected as NSFW\n\n" +
+                                (content
+                                    ? `**Message:**\n\`\`\`${content}\`\`\``
+                                    : "**Message:** *Message had no content*")
+                        },
+                        list: list,
+                        hidden: {
+                            guild: message.channel.guild.id
+                        }
+                    };
+                    return log(data);
                 }
                 if (config.filters.wordFilter.enabled) {
                     const text = await TestImage(url);
@@ -205,34 +209,30 @@
                     }
                 }
             }
-            if (config.filters.malware) {
-                if (!(await MalwareCheck(url))) {
-                    messageException(message.guild.id, message.channel.id, message.id);
-                    await message.delete();
-                    const data = {
-                        meta: {
-                            type: "messageDelete",
-                            displayName: "Message Deleted",
-                            calculateType: "autoModeratorDeleted",
-                            color: NucleusColors.red,
-                            emoji: "MESSAGE.DELETE",
-                            timestamp: Date.now()
-                        },
-                        separate: {
-                            start:
-                                filter +
-                                " File detected as malware\n\n" +
-                                (content
-                                    ? `**Message:**\n\`\`\`${content}\`\`\``
-                                    : "**Message:** *Message had no content*")
-                        },
-                        list: list,
-                        hidden: {
-                            guild: message.channel.guild.id
-                        }
-                    };
-                    return log(data);
-                }
+            if (config.filters.malware && (await MalwareCheck(url))) {
+                messageException(message.guild.id, message.channel.id, message.id);
+                await message.delete();
+                const data = {
+                    meta: {
+                        type: "messageDelete",
+                        displayName: "Message Deleted",
+                        calculateType: "autoModeratorDeleted",
+                        color: NucleusColors.red,
+                        emoji: "MESSAGE.DELETE",
+                        timestamp: Date.now()
+                    },
+                    separate: {
+                        start:
+                            filter +
+                            " File detected as malware\n\n" +
+                            (content ? `**Message:**\n\`\`\`${content}\`\`\`` : "**Message:** *Message had no content*")
+                    },
+                    list: list,
+                    hidden: {
+                        guild: message.channel.guild.id
+                    }
+                };
+                return log(data);
             }
         }
     }
diff --git a/src/events/messageDelete.ts b/src/events/messageDelete.ts
index c29bfd0..b847400 100644
--- a/src/events/messageDelete.ts
+++ b/src/events/messageDelete.ts
@@ -68,5 +68,5 @@
             guild: message.guild!.id
         }
     };
-    log(data);
+    await log(data);
 }
diff --git a/src/events/messageEdit.ts b/src/events/messageEdit.ts
index b743147..270da00 100644
--- a/src/events/messageEdit.ts
+++ b/src/events/messageEdit.ts
@@ -103,5 +103,5 @@
             guild: newMessage.guild.id
         }
     };
-    log(data);
+    await log(data);
 }
diff --git a/src/events/roleCreate.ts b/src/events/roleCreate.ts
index 9b900f8..ea85b4d 100644
--- a/src/events/roleCreate.ts
+++ b/src/events/roleCreate.ts
@@ -30,5 +30,5 @@
             guild: role.guild.id
         }
     };
-    log(data);
+    await log(data);
 }
diff --git a/src/events/roleDelete.ts b/src/events/roleDelete.ts
index e83d557..1802518 100644
--- a/src/events/roleDelete.ts
+++ b/src/events/roleDelete.ts
@@ -42,5 +42,5 @@
             guild: role.guild.id
         }
     };
-    log(data);
+    await log(data);
 }
diff --git a/src/events/roleUpdate.ts b/src/events/roleUpdate.ts
index 236bc0f..c15cf01 100644
--- a/src/events/roleUpdate.ts
+++ b/src/events/roleUpdate.ts
@@ -74,5 +74,5 @@
             guild: newRole.guild.id
         }
     }; // TODO: make our own page for this
-    log(data);
+    await log(data);
 }
diff --git a/src/events/stickerCreate.ts b/src/events/stickerCreate.ts
index 01944fc..bc8adb8 100644
--- a/src/events/stickerCreate.ts
+++ b/src/events/stickerCreate.ts
@@ -32,5 +32,5 @@
             guild: sticker.guild!.id
         }
     };
-    log(data);
+    await log(data);
 }
diff --git a/src/events/stickerDelete.ts b/src/events/stickerDelete.ts
index a348b73..7704c49 100644
--- a/src/events/stickerDelete.ts
+++ b/src/events/stickerDelete.ts
@@ -30,5 +30,5 @@
             guild: sticker.guild!.id
         }
     };
-    log(data);
+    await log(data);
 }
diff --git a/src/events/stickerUpdate.ts b/src/events/stickerUpdate.ts
index c42f775..4be1a3d 100644
--- a/src/events/stickerUpdate.ts
+++ b/src/events/stickerUpdate.ts
@@ -35,5 +35,5 @@
             guild: newSticker.guild!.id
         }
     };
-    log(data);
+    await log(data);
 }
diff --git a/src/events/threadCreate.ts b/src/events/threadCreate.ts
index cefaf3b..42cda47 100644
--- a/src/events/threadCreate.ts
+++ b/src/events/threadCreate.ts
@@ -44,5 +44,5 @@
             guild: thread.guild.id
         }
     };
-    log(data);
+    await log(data);
 }
diff --git a/src/events/threadDelete.ts b/src/events/threadDelete.ts
index ecbf4cf..fba6592 100644
--- a/src/events/threadDelete.ts
+++ b/src/events/threadDelete.ts
@@ -46,5 +46,5 @@
             guild: thread.guild.id
         }
     };
-    log(data);
+    await log(data);
 }
diff --git a/src/events/threadUpdate.ts b/src/events/threadUpdate.ts
index 510ec30..e28abf1 100644
--- a/src/events/threadUpdate.ts
+++ b/src/events/threadUpdate.ts
@@ -55,5 +55,5 @@
             guild: newThread.guild.id
         }
     };
-    log(data);
+    await log(data);
 }
diff --git a/src/events/webhookUpdate.ts b/src/events/webhookUpdate.ts
index 438c66e..c4a4efb 100644
--- a/src/events/webhookUpdate.ts
+++ b/src/events/webhookUpdate.ts
@@ -130,7 +130,7 @@
                 guild: channel.guild.id
             }
         };
-        log(data);
+        await log(data);
     } catch (e) {
         console.log(e);
     }
diff --git a/src/index.ts b/src/index.ts
index 50a1526..b3883a1 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -8,7 +8,7 @@
 
 client.on("ready", async () => {
     console.log(`Logged in as ${client.user!.tag}!`);
-    register();
+    await register();
     runServer(client);
     if (config.enableDevelopment) {
         client.fetchedCommands = await client.guilds.cache.get(config.developmentGuildID)?.commands.fetch()!;
diff --git a/src/premium/attachmentLogs.ts b/src/premium/attachmentLogs.ts
index e719f22..9bb216d 100644
--- a/src/premium/attachmentLogs.ts
+++ b/src/premium/attachmentLogs.ts
@@ -36,7 +36,7 @@
     if (await client.database.premium.hasPremium(message.guild.id)) {
         const channel = (await client.database.guilds.read(message.guild.id)).logging.attachments.channel;
         if (!channel) {
-            singleNotify(
+            await singleNotify(
                 "noAttachmentLogChannel",
                 message.guild.id,
                 `No channel set for attachment logging. You can set one with ${getCommandMentionByName(
@@ -48,7 +48,7 @@
         }
         const channelObj = await message.guild.channels.fetch(channel);
         if (!channelObj) {
-            singleNotify(
+            await singleNotify(
                 "attachmentLogChannelDeleted",
                 message.guild.id,
                 `Your attachment history channel was deleted or is not longer accessible. You can set a new one with ${getCommandMentionByName(
@@ -75,7 +75,7 @@
             ],
             files: attachments.map((file) => file.local)
         });
-        client.database.guilds.write(message.guild.id, {
+        await client.database.guilds.write(message.guild.id, {
             [`logging.attachments.saved.${message.channel.id}${message.id}`]: m.url
         });
         return { files: attachments, jump: m.url };
diff --git a/src/premium/createTranscript.ts b/src/premium/createTranscript.ts
index 7a1f57f..fa1f7a4 100644
--- a/src/premium/createTranscript.ts
+++ b/src/premium/createTranscript.ts
@@ -134,7 +134,7 @@
             guild: interaction.guild!.id
         }
     };
-    log(data);
+    await log(data);
     await interaction.channel.delete();
     return;
 }
diff --git a/src/reflex/guide.ts b/src/reflex/guide.ts
index 1901d34..59c12c7 100644
--- a/src/reflex/guide.ts
+++ b/src/reflex/guide.ts
@@ -353,12 +353,12 @@
             const em = new Discord.EmbedBuilder(pages[page]!.embed);
             em.setDescription(em.data.description + "\n\n" + createPageIndicator(pages.length, page));
             em.setFooter({ text: "Message closed" });
-            interaction.editReply({
+            await interaction.editReply({
                 embeds: [em],
                 components: []
             });
         } else {
-            m.delete();
+            await m.delete();
         }
     }
 };
diff --git a/src/reflex/nsfwjs b/src/reflex/nsfwjs
new file mode 160000
index 0000000..f482648
--- /dev/null
+++ b/src/reflex/nsfwjs
@@ -0,0 +1 @@
+Subproject commit f48264888bc1b2a805e4b20a5e5c82e11cb4754a
diff --git a/src/reflex/scanners.ts b/src/reflex/scanners.ts
index 53c8c9b..6d3fc71 100644
--- a/src/reflex/scanners.ts
+++ b/src/reflex/scanners.ts
@@ -6,99 +6,98 @@
 import client from "../utils/client.js";
 import { createHash } from "crypto";
 import * as nsfwjs from "nsfwjs";
-// import * as clamscan from "clamscan";
-import * as tf from "@tensorflow/tfjs";
+import ClamScan from "clamscan";
+import * as tf from "@tensorflow/tfjs-node";
 import EmojiEmbed from "../utils/generateEmojiEmbed.js";
 import getEmojiByName from "../utils/getEmojiByName.js";
 import { ActionRowBuilder, ButtonBuilder, ButtonStyle } from "discord.js";
+import config from "../config/main.js";
+import gm from "gm";
 
 interface NSFWSchema {
     nsfw: boolean;
     errored?: boolean;
 }
 interface MalwareSchema {
-    safe: boolean;
+    malware: boolean;
     errored?: boolean;
 }
 
-const nsfw_model = await nsfwjs.load();
+const nsfw_model = await nsfwjs.load("file://dist/reflex/nsfwjs/example/nsfw_demo/public/model/", { size: 299 });
+const clamscanner = await new ClamScan().init({
+    clamdscan: {
+        socket: "socket" in config.clamav ? (config.clamav.socket as string) : false,
+        host: "host" in config.clamav ? (config.clamav.host as string) : false,
+        port: "port" in config.clamav ? (config.clamav.port as number) : false
+    }
+});
 
-export async function testNSFW(link: string): Promise<NSFWSchema> {
-    const [fileStream, hash] = await streamAttachment(link);
+export async function testNSFW(url: string): Promise<NSFWSchema> {
+    const [fileStream, hash] = await streamAttachment(url);
     const alreadyHaveCheck = await client.database.scanCache.read(hash);
-    if (alreadyHaveCheck?.nsfw) return { nsfw: alreadyHaveCheck.nsfw };
+    if (alreadyHaveCheck && "nsfw" in alreadyHaveCheck!) {
+        return { nsfw: alreadyHaveCheck.nsfw };
+    }
 
-    const image = tf.tensor3d(new Uint8Array(fileStream));
+    const converted = (await new Promise((resolve, reject) =>
+        gm(fileStream)
+            .command("convert")
+            .toBuffer("PNG", (err, buf) => {
+                if (err) return reject(err);
+                resolve(buf);
+            })
+    )) as Buffer;
 
-    const predictions = (await nsfw_model.classify(image, 1))[0]!;
-    image.dispose();
+    const img = tf.node.decodeImage(converted, 3, undefined, false) as tf.Tensor3D;
 
-    return { nsfw: predictions.className === "Hentai" || predictions.className === "Porn" };
+    const predictions = (await nsfw_model.classify(img, 1))[0]!;
+    img.dispose();
+
+    const nsfw = predictions.className === "Hentai" || predictions.className === "Porn";
+    await client.database.scanCache.write(hash, "nsfw", nsfw);
+
+    return { nsfw };
 }
 
 export async function testMalware(link: string): Promise<MalwareSchema> {
-    const [_, hash] = await saveAttachment(link);
+    const [fileName, hash] = await saveAttachment(link);
     const alreadyHaveCheck = await client.database.scanCache.read(hash);
-    if (alreadyHaveCheck?.malware) return { safe: alreadyHaveCheck.malware };
-    return { safe: true };
-    // const data = new URLSearchParams();
-    // // const f = createReadStream(p);
-    // data.append("file", f.read(fs.statSync(p).size));
-    // const result = await fetch("https://unscan.p.rapidapi.com/malware", {
-    //     method: "POST",
-    //     headers: {
-    //         "X-RapidAPI-Key": client.config.rapidApiKey,
-    //         "X-RapidAPI-Host": "unscan.p.rapidapi.com"
-    //     },
-    //     body: data
-    // })
-    //     .then((response) =>
-    //         response.status === 200 ? (response.json() as Promise<MalwareSchema>) : { safe: true, errored: true }
-    //     )
-    //     .catch((err) => {
-    //         console.error(err);
-    //         return { safe: true, errored: true };
-    //     });
-    // if (!result.errored) {
-    //     client.database.scanCache.write(hash, "malware", result.safe);
-    // }
-    // return { safe: result.safe };
+    if (alreadyHaveCheck?.malware !== undefined) return { malware: alreadyHaveCheck.malware };
+    let malware;
+    try {
+        malware = (await clamscanner.scanFile(fileName)).isInfected;
+    } catch (e) {
+        return { malware: true };
+    }
+    await client.database.scanCache.write(hash, "malware", malware);
+    return { malware };
 }
 
 export async function testLink(link: string): Promise<{ safe: boolean; tags: string[] }> {
     const alreadyHaveCheck = await client.database.scanCache.read(link);
-    if (alreadyHaveCheck?.bad_link) return { safe: alreadyHaveCheck.bad_link, tags: alreadyHaveCheck.tags };
-    const scanned: { safe?: boolean; tags?: string[] } = await fetch("https://unscan.p.rapidapi.com/link", {
-        method: "POST",
-        headers: {
-            "X-RapidAPI-Key": client.config.rapidApiKey,
-            "X-RapidAPI-Host": "unscan.p.rapidapi.com"
-        },
-        body: `{"link":"${link}"}`
-    })
-        .then((response) => response.json() as Promise<MalwareSchema>)
-        .catch((err) => {
-            console.error(err);
-            return { safe: true, tags: [] };
-        });
-    client.database.scanCache.write(link, "bad_link", scanned.safe ?? true, scanned.tags ?? []);
-    return {
-        safe: scanned.safe ?? true,
-        tags: scanned.tags ?? []
-    };
+    if (alreadyHaveCheck?.bad_link !== undefined)
+        return { safe: alreadyHaveCheck.bad_link, tags: alreadyHaveCheck.tags ?? [] };
+    return { safe: true, tags: [] };
+    // const scanned: { safe?: boolean; tags?: string[] } = {}
+    // await client.database.scanCache.write(link, "bad_link", scanned.safe ?? true, scanned.tags ?? []);
+    // return {
+    //     safe: scanned.safe ?? true,
+    //     tags: scanned.tags ?? []
+    // };
 }
 
-export async function streamAttachment(link: string): Promise<[ArrayBuffer, string]> {
+export async function streamAttachment(link: string): Promise<[Buffer, string]> {
     const image = await (await fetch(link)).arrayBuffer();
     const enc = new TextDecoder("utf-8");
-    return [image, createHash("sha512").update(enc.decode(image), "base64").digest("base64")];
+    const buf = Buffer.from(image);
+    return [buf, createHash("sha512").update(enc.decode(image), "base64").digest("base64")];
 }
 
 export async function saveAttachment(link: string): Promise<[string, string]> {
     const image = await (await fetch(link)).arrayBuffer();
-    const fileName = generateFileName(link.split("/").pop()!.split(".").pop()!);
+    const fileName = await generateFileName(link.split("/").pop()!.split(".").pop()!);
     const enc = new TextDecoder("utf-8");
-    writeFileSync(fileName, new DataView(image), "base64");
+    writeFileSync(fileName, new DataView(image));
     return [fileName, createHash("sha512").update(enc.decode(image), "base64").digest("base64")];
 }
 
@@ -153,10 +152,11 @@
     return detectionsTypes as string[];
 }
 
-export async function NSFWCheck(element: string): Promise<boolean> {
+export async function NSFWCheck(url: string): Promise<boolean> {
     try {
-        return (await testNSFW(element)).nsfw;
-    } catch {
+        return (await testNSFW(url)).nsfw;
+    } catch (e) {
+        console.log(e);
         return false;
     }
 }
@@ -169,7 +169,7 @@
 
 export async function MalwareCheck(element: string): Promise<boolean> {
     try {
-        return (await testMalware(element)).safe;
+        return (await testMalware(element)).malware;
     } catch {
         return true;
     }
@@ -206,8 +206,9 @@
     return text;
 }
 
-export async function doMemberChecks(member: Discord.GuildMember, guild: Discord.Guild): Promise<void> {
+export async function doMemberChecks(member: Discord.GuildMember): Promise<void> {
     if (member.user.bot) return;
+    const guild = member.guild;
     const guildData = await client.database.guilds.read(guild.id);
     if (!guildData.logging.staff.channel) return;
     const [loose, strict] = [guildData.filters.wordFilter.words.loose, guildData.filters.wordFilter.words.strict];
@@ -217,20 +218,19 @@
     const nicknameCheck = TestString(member.nickname ?? "", loose, strict, guildData.filters.wordFilter.enabled);
     // Does the profile picture contain filtered words
     const avatarTextCheck = TestString(
-        (await TestImage(member.user.displayAvatarURL({ forceStatic: true }))) ?? "",
+        (await TestImage(member.displayAvatarURL({ forceStatic: true }))) ?? "",
         loose,
         strict,
         guildData.filters.wordFilter.enabled
     );
     // Is the profile picture NSFW
-    const avatarCheck =
-        guildData.filters.images.NSFW && (await NSFWCheck(member.user.displayAvatarURL({ forceStatic: true })));
+    const avatar = member.displayAvatarURL({ extension: "png", size: 1024, forceStatic: true });
+    const avatarCheck = guildData.filters.images.NSFW && (await NSFWCheck(avatar));
     // Does the username contain an invite
     const inviteCheck = guildData.filters.invite.enabled && /discord\.gg\/[a-zA-Z0-9]+/gi.test(member.user.username);
     // Does the nickname contain an invite
     const nicknameInviteCheck =
         guildData.filters.invite.enabled && /discord\.gg\/[a-zA-Z0-9]+/gi.test(member.nickname ?? "");
-
     if (
         usernameCheck !== null ||
         nicknameCheck !== null ||
@@ -257,7 +257,7 @@
         }
         if (avatarTextCheck !== null) {
             infractions.push(
-                `Profile picture contains a ${avatarTextCheck.type}ly filtered word: ${avatarTextCheck.word}`
+                `Profile picture contains a ${avatarTextCheck.type}ly filtered word (${avatarTextCheck.word})`
             );
         }
         if (infractions.length === 0) return;
@@ -272,39 +272,42 @@
                 `**Member:** ${member.user.username} (<@${member.user.id}>)\n\n` +
                     infractions.map((element) => `${filter} ${element}`).join("\n")
             );
+        const buttons = [
+            new ButtonBuilder()
+                .setCustomId(`mod:warn:${member.user.id}`)
+                .setLabel("Warn")
+                .setStyle(ButtonStyle.Primary),
+            new ButtonBuilder()
+                .setCustomId(`mod:mute:${member.user.id}`)
+                .setLabel("Mute")
+                .setStyle(ButtonStyle.Primary),
+            new ButtonBuilder().setCustomId(`mod:kick:${member.user.id}`).setLabel("Kick").setStyle(ButtonStyle.Danger),
+            new ButtonBuilder().setCustomId(`mod:ban:${member.user.id}`).setLabel("Ban").setStyle(ButtonStyle.Danger)
+        ];
+        if (usernameCheck !== null || nicknameCheck !== null)
+            buttons.concat([
+                new ButtonBuilder()
+                    .setCustomId(`mod:nickname:${member.user.id}`)
+                    .setLabel("Change Name")
+                    .setStyle(ButtonStyle.Primary)
+            ]);
+        if (avatarCheck || avatarTextCheck !== null)
+            buttons.concat([
+                new ButtonBuilder().setURL(member.displayAvatarURL()).setLabel("View Avatar").setStyle(ButtonStyle.Link)
+            ]);
+        const components: ActionRowBuilder<ButtonBuilder>[] = [];
+
+        for (let i = 0; i < buttons.length; i += 5) {
+            components.push(
+                new ActionRowBuilder<ButtonBuilder>().addComponents(
+                    buttons.slice(i, Math.min(buttons.length - 1, i + 5))
+                )
+            );
+        }
+
         await channel.send({
             embeds: [embed],
-            components: [
-                new ActionRowBuilder<ButtonBuilder>().addComponents(
-                    ...[
-                        new ButtonBuilder()
-                            .setCustomId(`mod:warn:${member.user.id}`)
-                            .setLabel("Warn")
-                            .setStyle(ButtonStyle.Primary),
-                        new ButtonBuilder()
-                            .setCustomId(`mod:mute:${member.user.id}`)
-                            .setLabel("Mute")
-                            .setStyle(ButtonStyle.Primary),
-                        new ButtonBuilder()
-                            .setCustomId(`mod:kick:${member.user.id}`)
-                            .setLabel("Kick")
-                            .setStyle(ButtonStyle.Danger),
-                        new ButtonBuilder()
-                            .setCustomId(`mod:ban:${member.user.id}`)
-                            .setLabel("Ban")
-                            .setStyle(ButtonStyle.Danger)
-                    ].concat(
-                        usernameCheck !== null || nicknameCheck !== null || avatarTextCheck !== null
-                            ? [
-                                  new ButtonBuilder()
-                                      .setCustomId(`mod:nickname:${member.user.id}`)
-                                      .setLabel("Change Name")
-                                      .setStyle(ButtonStyle.Primary)
-                              ]
-                            : []
-                    )
-                )
-            ]
+            components: components
         });
     }
 }
diff --git a/src/reflex/statsChannelUpdate.ts b/src/reflex/statsChannelUpdate.ts
index e3c7a2a..1b9379b 100644
--- a/src/reflex/statsChannelUpdate.ts
+++ b/src/reflex/statsChannelUpdate.ts
@@ -12,34 +12,43 @@
 export async function callback(user: User, guild: Guild) {
     guild = await client.guilds.fetch(guild.id);
     const config = await client.database.guilds.read(guild.id);
-    Object.entries(config.stats).forEach(async ([channel, props]) => {
-        if ((props as PropSchema).enabled) {
-            let string = (props as PropSchema).name;
-            if (!string) return;
-            string = await convertCurlyBracketString(string, user!.id, user!.username, guild!.name, guild!.members);
-            let fetchedChannel;
-            try {
-                fetchedChannel = await guild.channels.fetch(channel);
-            } catch (e) {
-                fetchedChannel = null;
-            }
-            if (!fetchedChannel) {
-                const deleted = config.stats[channel];
-                await client.database.guilds.write(guild.id, null, `stats.${channel}`);
-                return singleNotify(
-                    "statsChannelDeleted",
-                    guild.id,
-                    `One or more of your stats channels have been deleted. You can use ${getCommandMentionByName(
-                        "settings/stats"
-                    )}.\n` + `The channels name was: ${deleted!.name}`,
-                    "Critical"
-                );
-            }
-            try {
-                await fetchedChannel.setName(string.slice(0, 100));
-            } catch (e) {
-                console.error(e);
-            }
-        }
-    });
+    Object.entries(config.stats).forEach(
+        ([channel, props]) =>
+            void (async () => {
+                if ((props as PropSchema).enabled) {
+                    let string = (props as PropSchema).name;
+                    if (!string) return;
+                    string = await convertCurlyBracketString(
+                        string,
+                        user!.id,
+                        user!.username,
+                        guild!.name,
+                        guild!.members
+                    );
+                    let fetchedChannel;
+                    try {
+                        fetchedChannel = await guild.channels.fetch(channel);
+                    } catch (e) {
+                        fetchedChannel = null;
+                    }
+                    if (!fetchedChannel) {
+                        const deleted = config.stats[channel];
+                        await client.database.guilds.write(guild.id, null, `stats.${channel}`);
+                        return singleNotify(
+                            "statsChannelDeleted",
+                            guild.id,
+                            `One or more of your stats channels have been deleted. You can use ${getCommandMentionByName(
+                                "settings/stats"
+                            )}.\n` + `The channels name was: ${deleted!.name}`,
+                            "Critical"
+                        );
+                    }
+                    try {
+                        await fetchedChannel.setName(string.slice(0, 100));
+                    } catch (e) {
+                        console.error(e);
+                    }
+                }
+            })()
+    );
 }
diff --git a/src/reflex/verify.ts b/src/reflex/verify.ts
index a5991de..540fb4d 100644
--- a/src/reflex/verify.ts
+++ b/src/reflex/verify.ts
@@ -208,7 +208,7 @@
                     .setEmoji("CONTROL.BLOCKCROSS")
             ]
         });
-        singleNotify(
+        await singleNotify(
             "verifyRoleDeleted",
             interaction.guild!.id,
             `The role given when a member is verified has been deleted. Use ${getCommandMentionByName(
diff --git a/src/reflex/welcome.ts b/src/reflex/welcome.ts
index 8e471c6..33f1651 100644
--- a/src/reflex/welcome.ts
+++ b/src/reflex/welcome.ts
@@ -45,7 +45,7 @@
                         content: (config.welcome.ping ? `<@&${config.welcome.ping}>` : "") + `<@${member.id}>`
                     });
                 } catch (err) {
-                    singleNotify(
+                    await singleNotify(
                         "welcomeChannelDeleted",
                         member.guild.id,
                         `The welcome channel has been deleted or is no longer accessible. Use ${getCommandMentionByName(
diff --git a/src/utils/client.ts b/src/utils/client.ts
index 43f8c5f..6899b90 100644
--- a/src/utils/client.ts
+++ b/src/utils/client.ts
@@ -6,6 +6,7 @@
 import EventScheduler from "../utils/eventScheduler.js";
 import type { RoleMenuSchema } from "../actions/roleMenu.js";
 import config from "../config/main.js";
+import { Octokit } from "octokit";
 
 class NucleusClient extends Client {
     logger = Logger;
@@ -24,6 +25,7 @@
         scanCache: ScanCache;
         transcripts: Transcript;
     };
+    GitHub = new Octokit({ auth: config.githubPAT });
     preloadPage: Record<string, { command: string; argument: string }> = {}; // e.g. { channelID: { command: privacy, page: 3}}
     commands: Record<
         string,
diff --git a/src/utils/commandRegistration/register.ts b/src/utils/commandRegistration/register.ts
index fbd052f..d76617c 100644
--- a/src/utils/commandRegistration/register.ts
+++ b/src/utils/commandRegistration/register.ts
@@ -181,11 +181,19 @@
     client.on("interactionCreate", async (interaction: Interaction) => {
         if (interaction.isUserContextMenuCommand()) {
             const commandName = "contextCommands/user/" + interaction.commandName;
-            execute(client.commands[commandName]![0]?.check, client.commands[commandName]![0]?.callback, interaction);
+            await execute(
+                client.commands[commandName]![0]?.check,
+                client.commands[commandName]![0]?.callback,
+                interaction
+            );
             return;
         } else if (interaction.isMessageContextMenuCommand()) {
             const commandName = "contextCommands/message/" + interaction.commandName;
-            execute(client.commands[commandName]![0]?.check, client.commands[commandName]![0]?.callback, interaction);
+            await execute(
+                client.commands[commandName]![0]?.check,
+                client.commands[commandName]![0]?.callback,
+                interaction
+            );
             return;
         } else if (interaction.isAutocomplete()) {
             const commandName = interaction.commandName;
@@ -203,7 +211,7 @@
             const formatted = (choices ?? []).map((choice) => {
                 return { name: choice, value: choice };
             });
-            interaction.respond(formatted);
+            await interaction.respond(formatted);
         } else if (interaction.isChatInputCommand()) {
             const commandName = interaction.commandName;
             const subcommandGroupName = interaction.options.getSubcommandGroup(false);
@@ -219,7 +227,7 @@
             const command = client.commands[fullCommandName]![0];
             const callback = command?.callback;
             const check = command?.check;
-            execute(check, callback, interaction);
+            await execute(check, callback, interaction);
         }
     });
 }
diff --git a/src/utils/confirmationMessage.ts b/src/utils/confirmationMessage.ts
index 7b3bd31..0e4a9b4 100644
--- a/src/utils/confirmationMessage.ts
+++ b/src/utils/confirmationMessage.ts
@@ -42,7 +42,7 @@
         emoji: string;
         customId: string;
         modal: Discord.ModalBuilder;
-        value: string | undefined;
+        values: Record<string, string>;
     }[] = [];
 
     constructor(interaction: CommandInteraction | ButtonInteraction) {
@@ -106,9 +106,15 @@
         this.reason = reason;
         return this;
     }
-    addModal(buttonText: string, emoji: string, customId: string, current: string, modal: Discord.ModalBuilder) {
+    addModal(
+        buttonText: string,
+        emoji: string,
+        customId: string,
+        current: Record<string, string>,
+        modal: Discord.ModalBuilder
+    ) {
         modal.setCustomId(customId);
-        this.modals.push({ buttonText, emoji, customId, modal, value: current });
+        this.modals.push({ buttonText, emoji, customId, modal, values: current });
         return this;
     }
     async send(editOnly?: boolean): Promise<{
@@ -121,7 +127,7 @@
             emoji: string;
             customId: string;
             modal: Discord.ModalBuilder;
-            value: string | undefined;
+            values: Record<string, string>;
         }[];
     }> {
         let cancelled = false;
@@ -131,19 +137,19 @@
 
         while (!cancelled && success === undefined && !returnComponents && !newReason) {
             const fullComponents = [
-                new Discord.ButtonBuilder()
+                new ButtonBuilder()
                     .setCustomId("yes")
                     .setLabel("Confirm")
                     .setStyle(this.inverted ? ButtonStyle.Success : ButtonStyle.Danger)
                     .setEmoji(getEmojiByName("CONTROL.TICK", "id")),
-                new Discord.ButtonBuilder()
+                new ButtonBuilder()
                     .setCustomId("no")
                     .setLabel("Cancel")
-                    .setStyle(ButtonStyle.Secondary)
+                    .setStyle(ButtonStyle.Danger)
                     .setEmoji(getEmojiByName("CONTROL.CROSS", "id"))
             ];
             Object.entries(this.customButtons).forEach(([k, v]) => {
-                const button = new Discord.ButtonBuilder()
+                const button = new ButtonBuilder()
                     .setCustomId(k)
                     .setLabel(v.title)
                     .setStyle(v.active ? ButtonStyle.Success : ButtonStyle.Primary)
@@ -153,7 +159,7 @@
             });
             for (const modal of this.modals) {
                 fullComponents.push(
-                    new Discord.ButtonBuilder()
+                    new ButtonBuilder()
                         .setCustomId(modal.customId)
                         .setLabel(modal.buttonText)
                         .setStyle(ButtonStyle.Primary)
@@ -163,7 +169,7 @@
             }
             if (this.reason !== null)
                 fullComponents.push(
-                    new Discord.ButtonBuilder()
+                    new ButtonBuilder()
                         .setCustomId("reason")
                         .setLabel("Edit Reason")
                         .setStyle(ButtonStyle.Primary)
@@ -174,7 +180,7 @@
             for (let i = 0; i < fullComponents.length; i += 5) {
                 components.push(
                     new ActionRowBuilder<
-                        | Discord.ButtonBuilder
+                        | ButtonBuilder
                         | Discord.StringSelectMenuBuilder
                         | Discord.RoleSelectMenuBuilder
                         | Discord.UserSelectMenuBuilder
@@ -228,7 +234,7 @@
                 break;
             }
             if (component.customId === "yes") {
-                component.deferUpdate();
+                await component.deferUpdate();
                 for (const v of Object.values(this.customButtons)) {
                     if (!v.active) continue;
                     try {
@@ -241,7 +247,7 @@
                 returnComponents = true;
                 continue;
             } else if (component.customId === "no") {
-                component.deferUpdate();
+                await component.deferUpdate();
                 success = false;
                 returnComponents = true;
                 continue;
@@ -272,7 +278,7 @@
                             .setEmoji(this.emoji)
                     ],
                     components: [
-                        new ActionRowBuilder<Discord.ButtonBuilder>().addComponents(
+                        new ActionRowBuilder<ButtonBuilder>().addComponents(
                             new ButtonBuilder()
                                 .setLabel("Back")
                                 .setEmoji(getEmojiByName("CONTROL.LEFT", "id"))
@@ -291,10 +297,13 @@
                     cancelled = true;
                     continue;
                 }
-                if (out === null || out.isButton()) {
+                if (out === null) {
                     cancelled = true;
                     continue;
                 }
+                if (out.isButton()) {
+                    continue;
+                }
                 if (out instanceof ModalSubmitInteraction) {
                     newReason = out.fields.getTextInputValue("reason");
                     continue;
@@ -319,7 +328,7 @@
                             .setEmoji(this.emoji)
                     ],
                     components: [
-                        new ActionRowBuilder<Discord.ButtonBuilder>().addComponents(
+                        new ActionRowBuilder<ButtonBuilder>().addComponents(
                             new ButtonBuilder()
                                 .setLabel("Back")
                                 .setEmoji(getEmojiByName("CONTROL.LEFT", "id"))
@@ -339,16 +348,22 @@
                     cancelled = true;
                     continue;
                 }
-                if (out === null || out.isButton()) {
+                if (out === null) {
+                    cancelled = true;
+                    continue;
+                }
+                if (out.isButton()) {
                     continue;
                 }
                 if (out instanceof ModalSubmitInteraction) {
-                    chosenModal!.value = out.fields.getTextInputValue("default");
+                    out.fields.fields.forEach((f, k) => {
+                        chosenModal!.values[k] = f.value;
+                    });
                 }
                 returnComponents = true;
                 continue;
             } else {
-                component.deferUpdate();
+                await component.deferUpdate();
                 this.customButtons[component.customId]!.active = !this.customButtons[component.customId]!.active;
                 returnComponents = true;
                 continue;
diff --git a/src/utils/database.ts b/src/utils/database.ts
index a107d06..abb638f 100644
--- a/src/utils/database.ts
+++ b/src/utils/database.ts
@@ -142,6 +142,22 @@
         // console.log("Guild delete")
         await this.guilds.deleteOne({ id: guild });
     }
+
+    async staffChannels(): Promise<string[]> {
+        const entries = (
+            await this.guilds
+                .find(
+                    { "logging.staff.channel": { $exists: true } },
+                    { projection: { "logging.staff.channel": 1, _id: 0 } }
+                )
+                .toArray()
+        ).map((e) => e.logging.staff.channel);
+        const out: string[] = [];
+        for (const entry of entries) {
+            if (entry) out.push(entry);
+        }
+        return out;
+    }
 }
 
 interface TranscriptEmbed {
@@ -258,7 +274,6 @@
             .replace(/=/g, "")
             .replace(/\//g, "_")
             .replace(/\+/g, "-");
-        console.log(iv);
         for (const message of transcript.messages) {
             if (message.content) {
                 const encCipher = crypto.createCipheriv("AES-256-CBC", key, iv);
@@ -268,7 +283,7 @@
 
         const doc = await this.transcripts.insertOne(Object.assign(transcript, { code: code }), collectionOptions);
         if (doc.acknowledged) {
-            client.database.eventScheduler.schedule(
+            await client.database.eventScheduler.schedule(
                 "deleteTranscript",
                 (Date.now() + 1000 * 60 * 60 * 24 * 7).toString(),
                 { guild: transcript.guild, code: code, iv: iv, key: key }
@@ -327,10 +342,8 @@
     }
 
     async read(code: string, key: string, iv: string) {
-        console.log("Transcript read");
         let doc: TranscriptSchema | null = await this.transcripts.findOne({ code: code });
         let findDoc: findDocSchema | null = null;
-        console.log(doc);
         if (!doc) findDoc = await this.messageToTranscript.findOne({ transcript: code });
         if (findDoc) {
             const message = await (
@@ -356,7 +369,6 @@
             if (!data) return null;
             doc = JSON.parse(Buffer.from(data).toString()) as TranscriptSchema;
         }
-        console.log(doc);
         if (!doc) return null;
         for (const message of doc.messages) {
             if (message.content) {
@@ -591,7 +603,7 @@
     nsfw?: boolean;
     malware?: boolean;
     bad_link?: boolean;
-    tags: string[];
+    tags?: string[];
 }
 
 export class ScanCache {
@@ -606,9 +618,30 @@
     }
 
     async write(hash: string, type: "nsfw" | "malware" | "bad_link", data: boolean, tags?: string[]) {
-        await this.scanCache.insertOne(
-            { hash: hash, [type]: data, tags: tags ?? [], addedAt: new Date() },
-            collectionOptions
+        await this.scanCache.updateOne(
+            { hash: hash },
+            {
+                $set: (() => {
+                    switch (type) {
+                        case "nsfw": {
+                            return { nsfw: data, addedAt: new Date() };
+                        }
+                        case "malware": {
+                            return { malware: data, addedAt: new Date() };
+                        }
+                        case "bad_link": {
+                            return { bad_link: data, tags: tags ?? [], addedAt: new Date() };
+                        }
+                        default: {
+                            throw new Error("Invalid type");
+                        }
+                    }
+                })()
+                // No you can't just do { [type]: data }, yes it's a typescript error, no I don't know how to fix it
+                // cleanly, yes it would be marginally more elegant, no it's not essential, yes I'd be happy to review
+                // PRs that did improve this snippet
+            },
+            Object.assign({ upsert: true }, collectionOptions)
         );
     }
 
diff --git a/src/utils/dualCollector.ts b/src/utils/dualCollector.ts
index bf9b0c0..e96ff5d 100644
--- a/src/utils/dualCollector.ts
+++ b/src/utils/dualCollector.ts
@@ -32,11 +32,7 @@
                     time: 300000
                 })
                 .on("collect", (m) => {
-                    try {
-                        m.delete();
-                    } catch (e) {
-                        client.emit("error", e as Error);
-                    }
+                    void m.delete().catch();
                     resolve(m);
                 });
             mes.on("end", () => {
diff --git a/src/utils/eventScheduler.ts b/src/utils/eventScheduler.ts
index 34bb28e..48eee63 100644
--- a/src/utils/eventScheduler.ts
+++ b/src/utils/eventScheduler.ts
@@ -79,13 +79,13 @@
                     guild: guild.id
                 }
             };
-            log(data);
+            await log(data);
         });
     }
 
     async start() {
         await new Promise((resolve) => this.agenda.once("ready", resolve));
-        this.agenda.start();
+        await this.agenda.start();
         return this;
     }
 
@@ -95,8 +95,8 @@
     }
 
     // eslint-disable-next-line @typescript-eslint/no-explicit-any
-    cancel(name: string, data: any) {
-        this.agenda.cancel({ name, data });
+    async cancel(name: string, data: any) {
+        await this.agenda.cancel({ name, data });
     }
 }
 
diff --git a/src/utils/getCommandDataByName.ts b/src/utils/getCommandDataByName.ts
index 46f4362..dcf45ca 100644
--- a/src/utils/getCommandDataByName.ts
+++ b/src/utils/getCommandDataByName.ts
@@ -1,22 +1,40 @@
 import type Discord from "discord.js";
 import client from "./client.js";
 
+/**
+ * @param name The name of the command, not including a leading slash. This can be space or slash separated e.g. "mod/about" or "mod about"
+ * @returns A string which when put into Discord will mention the command if the command exists or a codeblock with the command name if it does not
+ *
+ * @throws Will throw an error if as empty string is passed
+ **/
 export const getCommandMentionByName = (name: string): string => {
     const split = name.replaceAll("/", " ").split(" ");
-    const commandName: string = split[0]!;
+    const commandName: string | undefined = split[0];
+    if (commandName === undefined) throw new RangeError(`Invalid command ${name} provided to getCommandByName`);
 
     const filterCommand = (command: Discord.ApplicationCommand) => command.name === commandName;
 
     const command = client.fetchedCommands.filter((c) => filterCommand(c));
-    if (command.size === 0) return `\`/${name.replaceAll("/", " ")}\``;
-    const commandID = command.first()!.id;
+    const commandID = command.first()?.id;
+
+    if (commandID === undefined) return `\`/${name.replaceAll("/", " ")}\``;
+
     return `</${split.join(" ")}:${commandID}>`;
 };
 
+/**
+ * @param name The name of the command, not including a leading slash. This can be space or slash separated e.g. "mod/about" or "mod about"
+ * @returns An object containing the command name, the command description and a string which when put into Discord will mention the command
+ *
+ * @throws Will throw an error if the command doesn't exist
+ * @throws Will throw an error if as empty string is passed
+ **/
 export const getCommandByName = (name: string): { name: string; description: string; mention: string } => {
     const split = name.replaceAll(" ", "/");
-    const command = client.commands["commands/" + split]!;
-    // console.log(command)
+    const command = client.commands["commands/" + split];
+
+    if (command === undefined) throw new RangeError(`Invalid command ${name} provided to getCommandByName`);
+
     const mention = getCommandMentionByName(name);
     return {
         name: command[1].name,
diff --git a/src/utils/getEmojiByName.ts b/src/utils/getEmojiByName.ts
index 99d1215..ebcb257 100644
--- a/src/utils/getEmojiByName.ts
+++ b/src/utils/getEmojiByName.ts
@@ -1,20 +1,31 @@
-import emojis from "../config/emojis.json" assert { type: "json" };
-import lodash from "lodash";
+import emojis from "../config/emojis.js";
+import _ from "lodash";
 
-const isArray = lodash.isArray;
 interface EmojisIndex {
     [key: string]: string | EmojisIndex | EmojisIndex[];
 }
 
-function getEmojiByName(name: string | null, format?: string): string {
-    if (!name) return "";
+const EMOJIPATHS: string[] = [];
+
+function getEmojiPaths(obj: EmojisIndex, path: string[] = []) {
+    for (const key in obj) {
+        if (typeof obj[key] === "string") {
+            EMOJIPATHS.push([...path, key].join("."));
+        } else {
+            getEmojiPaths(obj[key] as EmojisIndex, [...path, key]);
+        }
+    }
+}
+getEmojiPaths(emojis);
+
+function getEmojiByName(name: (typeof EMOJIPATHS)[number], format?: string): string {
     const parts = name.split(".");
     let id: string | EmojisIndex | EmojisIndex[] | undefined = emojis;
     for (const part of parts) {
         if (typeof id === "string" || id === undefined) {
             throw new Error(`Emoji ${name} not found`);
         }
-        if (isArray(id)) {
+        if (_.isArray(id)) {
             id = id[parseInt(part)];
         } else {
             id = id[part];
@@ -34,9 +45,9 @@
     if (id === undefined) {
         return "";
     } else if (id.toString().startsWith("a")) {
-        return `<a:_:${id.toString().slice(1, id.toString().length)}>`;
+        return `<a:N:${id.toString().slice(1, id.toString().length)}>`;
     }
-    return `<:_:${id}>`;
+    return `<:N:${id}>`;
 }
 
 export default getEmojiByName;
diff --git a/src/utils/log.ts b/src/utils/log.ts
index b29f365..3b6048a 100644
--- a/src/utils/log.ts
+++ b/src/utils/log.ts
@@ -99,9 +99,7 @@
     },
     async log(log: LoggerOptions): Promise<void> {
         if (!(await isLogging(log.hidden.guild, log.meta.calculateType))) return;
-        console.log(log.hidden.guild);
         const config = await client.database.guilds.read(log.hidden.guild);
-        console.log(config.logging.logs.channel);
 
         if (config.logging.logs.channel) {
             const channel = (await client.channels.fetch(config.logging.logs.channel)) as Discord.TextChannel | null;
@@ -127,7 +125,7 @@
                     )
                     .setTimestamp(log.meta.timestamp)
                     .setColor(log.meta.color);
-                channel.send({ embeds: [embed] });
+                await channel.send({ embeds: [embed] });
             }
         }
     },
diff --git a/src/utils/migration/migration.ts b/src/utils/migration/migration.ts
deleted file mode 100644
index 6286465..0000000
--- a/src/utils/migration/migration.ts
+++ /dev/null
@@ -1,80 +0,0 @@
-import * as fs from "fs";
-import client from "../client.js";
-import _ from "lodash";
-
-const dir = "./data";
-const files = fs.readdirSync(dir);
-
-for (const file of files) {
-    // eslint-disable-next-line @typescript-eslint/no-explicit-any
-    let rsmData: any;
-    try {
-        rsmData = JSON.parse(fs.readFileSync(`${dir}/${file}`, "utf8"));
-    } catch {
-        continue;
-    }
-    if (!rsmData.version || rsmData.version < 3) continue;
-    const nucleusData = await client.database.guilds.readOld(rsmData.guild_info.id);
-    const rsmToNucleus = {
-        id: rsmData.guild_info.id,
-        version: 1,
-        singleEventNotifications: {},
-        filters: {
-            images: {
-                NSFW: rsmData.images?.nsfw,
-                size: rsmData.images?.toosmall
-            },
-            malware: null,
-            wordFilter: {
-                enabled: true,
-                words: {
-                    strict: rsmData.wordfilter?.strict,
-                    loose: rsmData.wordfilter?.soft
-                },
-                allowed: {
-                    users: rsmData.wordfilter?.ignore?.members,
-                    roles: rsmData.wordfilter?.ignore?.roles,
-                    channels: rsmData.wordfilter?.ignore?.channels
-                }
-            },
-            invite: {
-                enabled: rsmData.invite?.enabled,
-                allowed: {
-                    channels: rsmData.invite?.whitelist?.members,
-                    roles: rsmData.invite?.whitelist?.roles,
-                    users: rsmData.invite?.whitelist?.channels
-                }
-            }
-        },
-        welcome: {
-            enabled: true,
-            role: rsmData.welcome?.role,
-            channel: rsmData.welcome?.message?.channel,
-            message: rsmData.welcome?.message?.text ?? null
-        },
-        logging: {
-            logs: {
-                enabled: true,
-                channel: rsmData.log_info?.log_channel
-            },
-            staff: {
-                channel: rsmData.log_info?.staff
-            }
-        },
-        verify: {
-            enabled: true,
-            role: rsmData.verify_role
-        },
-        tickets: {
-            enabled: true,
-            category: rsmData.modmail?.cat,
-            supportRole: rsmData.modmail?.mention,
-            maxTickets: rsmData.modmail?.max
-        },
-        tags: rsmData.tags
-    } as Partial<ReturnType<typeof client.database.guilds.read>>;
-    // console.log(rsmToNucleus)
-    const merged = _.merge(nucleusData, rsmToNucleus);
-    // console.log(merged)
-    await client.database.guilds.write(merged.id!, merged);
-}
diff --git a/src/utils/performanceTesting/record.ts b/src/utils/performanceTesting/record.ts
index 89f3ead..58246d0 100644
--- a/src/utils/performanceTesting/record.ts
+++ b/src/utils/performanceTesting/record.ts
@@ -14,7 +14,7 @@
     const user = guild.ownerId;
     const currentYear = new Date().getFullYear();
     const start = Date.now();
-    client.database.history.read(guild.id, user, currentYear - 1);
+    await client.database.history.read(guild.id, user, currentYear - 1);
     const end = Date.now();
     return end - start;
 };
@@ -34,25 +34,57 @@
         databaseRead: await databaseReadTime(),
         resources: await resources()
     };
-    if (results.discord > 1000 || results.databaseRead > 500 || results.resources.cpu > 100) {
-        singleNotify(
+    let bold: string;
+    switch (true) {
+        case results.discord > 1000:
+            bold = "DiscordPing";
+            break;
+        case results.databaseRead > 500:
+            bold = "DatabaseRead";
+            break;
+        case results.resources.cpu > 100:
+            bold = "CPUUsage";
+            break;
+        case results.resources.memory > 5000:
+            bold = "MemoryUsage";
+            break;
+        case results.resources.temperature > 80:
+            bold = "Temperature";
+            break;
+        default:
+            bold = "None";
+    }
+    if (
+        results.discord > 1000 ||
+        results.databaseRead > 500 ||
+        results.resources.cpu > 100 ||
+        results.resources.memory > 5000 ||
+        results.resources.temperature > 80
+    ) {
+        await singleNotify(
             "performanceTest",
             config.developmentGuildID,
-            `Discord ping time: \`${results.discord}ms\`\nDatabase read time: \`${
-                results.databaseRead
-            }ms\`\nCPU usage: \`${results.resources.cpu}%\`\nMemory usage: \`${Math.round(
-                results.resources.memory
-            )}MB\`\nCPU temperature: \`${results.resources.temperature}°C\``,
+            `${bold === "DiscordPing" ? "**Discord ping time:**" : "Discord ping time:"} \`${results.discord}ms\`\n` +
+                `${bold === "DatabaseRead" ? "**Database read time:**" : "Database read time:"} \`${
+                    results.databaseRead
+                }ms\`\n` +
+                `${bold === "CPUUsage" ? "**CPU usage:**" : "CPU usage:"} \`${results.resources.cpu}%\`\n` +
+                `${bold === "MemoryUsage" ? "**Memory usage:**" : "Memory usage:"} \`${Math.round(
+                    results.resources.memory
+                )}MB\`\n` +
+                `${bold === "Temperature" ? "**CPU temperature:**" : "CPU temperature:"} \`${
+                    results.resources.temperature
+                }°C\``,
             "Critical",
             config.owners
         );
     } else {
-        singleNotify("performanceTest", config.developmentGuildID, true);
+        await singleNotify("performanceTest", config.developmentGuildID, true);
     }
 
-    client.database.performanceTest.record(results);
-    setTimeout(async () => {
-        await record();
+    await client.database.performanceTest.record(results);
+    setTimeout(() => {
+        void record();
     }, 60 * 1000);
 };
 
diff --git a/src/utils/temp/generateFileName.ts b/src/utils/temp/generateFileName.ts
index 109478d..8feefbb 100644
--- a/src/utils/temp/generateFileName.ts
+++ b/src/utils/temp/generateFileName.ts
@@ -6,13 +6,13 @@
 const __filename = fileURLToPath(import.meta.url);
 const __dirname = path.dirname(__filename);
 
-export default function generateFileName(ending: string): string {
+export default async function generateFileName(ending: string): Promise<string> {
     let fileName = crypto.randomBytes(35).toString("hex");
     fileName = fileName.replace(/([a-zA-Z0-9]{8})/g, "$1-");
     if (fs.existsSync(`./${fileName}`)) {
-        fileName = generateFileName(ending);
+        fileName = await generateFileName(ending);
     }
-    client.database.eventScheduler.schedule("deleteFile", (Date.now() + 60 * 1000).toString(), {
+    await client.database.eventScheduler.schedule("deleteFile", (Date.now() + 60 * 1000).toString(), {
         fileName: `${fileName}.${ending}`
     });
     return path.join(__dirname, fileName + "." + ending);
diff --git a/src/utils/types/recursivePartial.d.ts b/src/utils/types/recursivePartial.d.ts
new file mode 100644
index 0000000..a578bb4
--- /dev/null
+++ b/src/utils/types/recursivePartial.d.ts
@@ -0,0 +1,7 @@
+type RecursivePartial<T> = {
+    [P in keyof T]?: T[P] extends (infer U)[]
+        ? RecursivePartial<U>[]
+        : T[P] extends object
+        ? RecursivePartial<T[P]>
+        : T[P];
+};
diff --git a/tsconfig.json b/tsconfig.json
index 8b0fe7d..1df2f7d 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -14,5 +14,5 @@
         "noImplicitReturns": false
     },
     "include": ["src/**/*", "src/*", "src/config/main.d.ts", "src/config/main.ts"],
-    "exclude": ["src/Unfinished/**/*"]
+    "exclude": ["src/Unfinished/**/*", "src/reflex/nsfwjs/**/*"]
 }
