diff --git a/src/utils/confirmationMessage.ts b/src/utils/confirmationMessage.ts
index 58ab9d4..c805395 100644
--- a/src/utils/confirmationMessage.ts
+++ b/src/utils/confirmationMessage.ts
@@ -26,6 +26,8 @@
     interaction: CommandInteraction;
     title = "";
     emoji = "";
+    redEmoji: string | null = null;
+    timeoutText: string | null = null;
     description = "";
     color: "Danger" | "Warning" | "Success" = "Success";
     customButtons: Record<string, CustomBoolean<unknown>> = {};
@@ -40,12 +42,14 @@
         this.title = title;
         return this;
     }
-    setEmoji(emoji: string) {
+    setEmoji(emoji: string, redEmoji?: string) {
         this.emoji = emoji;
+        if (redEmoji) this.redEmoji = redEmoji; // TODO: go through all confirmation messages and change them to use this, and not do their own edits
         return this;
     }
-    setDescription(description: string) {
+    setDescription(description: string, timedOut?: string) {
         this.description = description;
+        if (timedOut) this.timeoutText = timedOut; // TODO also this
         return this;
     }
     setColor(color: "Danger" | "Warning" | "Success") {
@@ -256,13 +260,29 @@
         }
         const returnValue: Awaited<ReturnType<typeof this.send>> = {};
 
-        if (returnComponents) returnValue.components = this.customButtons;
+        if (returnComponents || success !== undefined) returnValue.components = this.customButtons;
         if (success !== undefined) returnValue.success = success;
-        if (cancelled) returnValue.cancelled = true;
+        if (cancelled) {
+            await this.timeoutError()
+            returnValue.cancelled = true;
+        }
         if (newReason) returnValue.newReason = newReason;
 
         return returnValue;
     }
+
+    async timeoutError(): Promise<void> {
+        await this.interaction.editReply({
+            embeds: [
+                new EmojiEmbed()
+                    .setTitle(this.title)
+                    .setDescription("We closed this message because it was not used for a while.")
+                    .setStatus("Danger")
+                    .setEmoji(this.redEmoji ?? this.emoji)
+            ],
+            components: []
+    })
+    }
 }
 
 export default confirmationMessage;
