diff --git a/src/Unfinished/all.ts b/src/Unfinished/all.ts
index eea33f5..b5b7d89 100644
--- a/src/Unfinished/all.ts
+++ b/src/Unfinished/all.ts
@@ -16,9 +16,7 @@
 import client from "../utils/client.js";
 
 const command = (builder: SlashCommandSubcommandBuilder) =>
-    builder
-        .setName("all")
-        .setDescription("Gives or removes a role from everyone");
+    builder.setName("all").setDescription("Gives or removes a role from everyone");
 
 class Filter {
     name: string;
@@ -244,13 +242,17 @@
                         .setLabel("Apply")
                         .setStyle(ButtonStyle.Primary)
                         .setCustomId("apply")
-                        .setEmoji(client.emojis.cache.get(getEmojiByName("CONTROL.TICK", "id"))! as APIMessageComponentEmoji)
+                        .setEmoji(
+                            client.emojis.cache.get(getEmojiByName("CONTROL.TICK", "id"))! as APIMessageComponentEmoji
+                        )
                         .setDisabled(affected.length === 0),
                     new ButtonBuilder()
                         .setLabel("Add filter")
                         .setStyle(ButtonStyle.Primary)
                         .setCustomId("add")
-                        .setEmoji(client.emojis.cache.get(getEmojiByName("ICONS.FILTER", "id"))! as APIMessageComponentEmoji)
+                        .setEmoji(
+                            client.emojis.cache.get(getEmojiByName("ICONS.FILTER", "id"))! as APIMessageComponentEmoji
+                        )
                         .setDisabled(filters.length >= 25)
                 ])
             ]
diff --git a/src/Unfinished/categorizationTest.ts b/src/Unfinished/categorizationTest.ts
index ff2d66b..763669c 100644
--- a/src/Unfinished/categorizationTest.ts
+++ b/src/Unfinished/categorizationTest.ts
@@ -1,5 +1,14 @@
 import { LoadingEmbed } from "../utils/defaults.js";
-import { CommandInteraction, GuildChannel, ActionRowBuilder, ButtonBuilder, ButtonStyle, ChannelType, StringSelectMenuBuilder, APIMessageComponentEmoji } from "discord.js";
+import {
+    CommandInteraction,
+    GuildChannel,
+    ActionRowBuilder,
+    ButtonBuilder,
+    ButtonStyle,
+    ChannelType,
+    StringSelectMenuBuilder,
+    APIMessageComponentEmoji
+} from "discord.js";
 import { SlashCommandBuilder } from "discord.js";
 import EmojiEmbed from "../utils/generateEmojiEmbed.js";
 import client from "../utils/client.js";
@@ -24,7 +33,7 @@
         staff: ["staff", "mod", "admin", "helper", "train"],
         spam: ["spam", "count"],
         logs: ["log"],
-        other: ["random", "starboard"],
+        other: ["random", "starboard"]
     };
     for (const c of channels.values()) {
         for (const type in types) {
@@ -75,12 +84,16 @@
                         .setCustomId("accept")
                         .setStyle(ButtonStyle.Success)
                         .setDisabled(predicted[channel].length === 0)
-                        .setEmoji(client.emojis.cache.get(getEmojiByName("ICONS.TICK", "id")) as APIMessageComponentEmoji),
+                        .setEmoji(
+                            client.emojis.cache.get(getEmojiByName("ICONS.TICK", "id")) as APIMessageComponentEmoji
+                        ),
                     new ButtonBuilder()
                         .setLabel('Use "Other"')
                         .setCustomId("reject")
                         .setStyle(ButtonStyle.Secondary)
-                        .setEmoji(client.emojis.cache.get(getEmojiByName("ICONS.CROSS", "id")) as APIMessageComponentEmoji)
+                        .setEmoji(
+                            client.emojis.cache.get(getEmojiByName("ICONS.CROSS", "id")) as APIMessageComponentEmoji
+                        )
                 ])
             ]
         });
@@ -88,7 +101,13 @@
         try {
             i = await m.awaitMessageComponent({
                 time: 300000,
-                filter: (i) => { return i.user.id === interaction.user.id && i.channel!.id === interaction.channel!.id && i.message.id === m.id}
+                filter: (i) => {
+                    return (
+                        i.user.id === interaction.user.id &&
+                        i.channel!.id === interaction.channel!.id &&
+                        i.message.id === m.id
+                    );
+                }
             });
         } catch (e) {
             return await interaction.editReply({
