diff --git a/src/utils/confirmationMessage.ts b/src/utils/confirmationMessage.ts
index 5bfbfdb..7b3bd31 100644
--- a/src/utils/confirmationMessage.ts
+++ b/src/utils/confirmationMessage.ts
@@ -37,7 +37,13 @@
     inverted = false;
     reason: string | null = null;
 
-    modals: {buttonText: string, emoji: string, customId: string, modal: Discord.ModalBuilder, value: string | undefined}[] = [];
+    modals: {
+        buttonText: string;
+        emoji: string;
+        customId: string;
+        modal: Discord.ModalBuilder;
+        value: string | undefined;
+    }[] = [];
 
     constructor(interaction: CommandInteraction | ButtonInteraction) {
         this.interaction = interaction;
@@ -102,7 +108,7 @@
     }
     addModal(buttonText: string, emoji: string, customId: string, current: string, modal: Discord.ModalBuilder) {
         modal.setCustomId(customId);
-        this.modals.push({buttonText, emoji, customId, modal, value: current});
+        this.modals.push({ buttonText, emoji, customId, modal, value: current });
         return this;
     }
     async send(editOnly?: boolean): Promise<{
@@ -110,7 +116,13 @@
         cancelled?: boolean;
         components?: Record<string, CustomBoolean<unknown>>;
         newReason?: string;
-        modals?: {buttonText: string, emoji: string, customId: string, modal: Discord.ModalBuilder, value: string | undefined}[];
+        modals?: {
+            buttonText: string;
+            emoji: string;
+            customId: string;
+            modal: Discord.ModalBuilder;
+            value: string | undefined;
+        }[];
     }> {
         let cancelled = false;
         let success: boolean | undefined = undefined;
@@ -212,7 +224,7 @@
                     time: 300000
                 });
             } catch (e) {
-                success = false
+                success = false;
                 break;
             }
             if (component.customId === "yes") {
@@ -291,7 +303,12 @@
                     continue;
                 }
             } else if (this.modals.map((m) => m.customId).includes(component.customId)) {
-                const chosenModal = this.modals.find((component => m => m.customId === component.customId)(component));
+                const chosenModal = this.modals.find(
+                    (
+                        (component) => (m) =>
+                            m.customId === component.customId
+                    )(component)
+                );
                 await component.showModal(chosenModal!.modal);
                 await this.interaction.editReply({
                     embeds: [
@@ -364,7 +381,12 @@
         const modals = this.modals;
         const typedReturnValue = returnValue as
             | { cancelled: true }
-            | { success: boolean; components: Record<string, CustomBoolean<unknown>>; modals: typeof modals; newReason?: string }
+            | {
+                  success: boolean;
+                  components: Record<string, CustomBoolean<unknown>>;
+                  modals: typeof modals;
+                  newReason?: string;
+              }
             | { newReason: string; components: Record<string, CustomBoolean<unknown>>; modals: typeof modals }
             | { components: Record<string, CustomBoolean<unknown>>; modals: typeof modals };
 
