diff --git a/src/automations/createModActionTicket.ts b/src/automations/createModActionTicket.ts
index 4de2924..ef317b7 100644
--- a/src/automations/createModActionTicket.ts
+++ b/src/automations/createModActionTicket.ts
@@ -3,7 +3,7 @@
 import generateEmojiEmbed from '../utils/generateEmojiEmbed.js';
 import getEmojiByName from "../utils/getEmojiByName.js";
 
-export async function create(guild: Discord.Guild, member: Discord.User, client) {
+export async function create(guild: Discord.Guild, member: Discord.User, createdBy: Discord.User, client) {
     let config = await readConfig(guild.id);
     // @ts-ignore
     const { log, NucleusColors, entry, renderUser, renderChannel, renderDelta } = client.logger
@@ -70,6 +70,7 @@
             },
             list: {
                 ticketFor: entry(member.id, renderUser(member)),
+                createdBy: entry(createdBy.id, renderUser(createdBy)),
                 created: entry(new Date().getTime(), renderDelta(new Date().getTime())),
                 ticketChannel: entry(c.id, renderChannel(c)),
             },
diff --git a/src/automations/tickets/delete.ts b/src/automations/tickets/delete.ts
index 32315bc..17d889a 100644
--- a/src/automations/tickets/delete.ts
+++ b/src/automations/tickets/delete.ts
@@ -11,7 +11,7 @@
     let channel = (interaction.channel as Discord.TextChannel)
     if (!channel.parent || config.tickets.category != channel.parent.id) {
         return interaction.reply({embeds: [new generateEmojiEmbed()
-            .setTitle("Close Ticket")
+            .setTitle("Deleting Ticket...")
             .setDescription("This ticket is not in your tickets category, so cannot be deleted. You cannot run close in a thread.") // TODO bridge to cross later!
             .setStatus("Danger")
             .setEmoji("CONTROL.BLOCKCROSS")
@@ -19,96 +19,92 @@
     }
     let status = channel.topic.split(" ")[1];
     if (status == "Archived") {
-        interaction.reply({embeds: [new generateEmojiEmbed()
-            .setTitle("Close Ticket")
-            .setDescription("This ticket will be deleted in 3 seconds.")
+        await interaction.reply({embeds: [new generateEmojiEmbed()
+            .setTitle("Delete Ticket")
+            .setDescription("Your ticket is being deleted...")
             .setStatus("Danger")
             .setEmoji("GUILD.TICKET.CLOSE")
         ]});
-        setTimeout(async () => {
-            let data = {
-                meta:{
-                    type: 'ticketClosed',
-                    displayName: 'Ticket Closed',
-                    calculateType: true,
-                    color: NucleusColors.red,
-                    emoji: 'GUILD.TICKET.CLOSE',
-                    timestamp: new Date().getTime()
-                },
-                list: {
-                    ticketFor: entry(channel.topic.split(" ")[0], renderUser((await interaction.guild.members.fetch(channel.topic.split(" ")[0])).user)),
-                    closedBy: entry(interaction.member.user.id, renderUser(interaction.member.user)),
-                    closed: entry(new Date().getTime(), renderDelta(new Date().getTime()))
-                },
-                hidden: {
-                    guild: interaction.guild.id
-                }
+        let data = {
+            meta:{
+                type: 'ticketDeleted',
+                displayName: 'Ticket Deleted',
+                calculateType: true,
+                color: NucleusColors.red,
+                emoji: 'GUILD.TICKET.CLOSE',
+                timestamp: new Date().getTime()
+            },
+            list: {
+                ticketFor: entry(channel.topic.split(" ")[0], renderUser((await interaction.guild.members.fetch(channel.topic.split(" ")[0])).user)),
+                deletedBy: entry(interaction.member.user.id, renderUser(interaction.member.user)),
+                closed: entry(new Date().getTime(), renderDelta(new Date().getTime()))
+            },
+            hidden: {
+                guild: interaction.guild.id
             }
-            log(data, interaction.client);
-            interaction.channel.delete();
-        }, 3000);
+        }
+        log(data, interaction.client);
+        interaction.channel.delete();
         return;
     } else if (status == "Active") {
-        interaction.reply({embeds: [new generateEmojiEmbed()
+        await interaction.reply({embeds: [new generateEmojiEmbed()
             .setTitle("Close Ticket")
-            .setDescription("This ticket will be archived in 3 seconds.")
+            .setDescription("Your ticket is being closed...")
             .setStatus("Warning")
             .setEmoji("GUILD.TICKET.ARCHIVED")
         ]});
-        setTimeout(async () =>{
-            let overwrites = [
-                {
-                    id: channel.topic.split(" ")[0],
-                    deny: ["VIEW_CHANNEL"],
-                    type: "member"
-                },
-                {
-                    id: interaction.guild.id,
-                    deny: ["VIEW_CHANNEL"],
-                    type: "role"
-                }
-            ] as Discord.OverwriteResolvable[];
-            if (config.tickets.supportRole != null) {
-                overwrites.push({
-                    id: interaction.guild.roles.cache.get(config.tickets.supportRole),
-                    allow: ["VIEW_CHANNEL", "SEND_MESSAGES", "ATTACH_FILES", "ADD_REACTIONS", "READ_MESSAGE_HISTORY"],
-                    type: "role"
-                })
+        let overwrites = [
+            {
+                id: channel.topic.split(" ")[0],
+                deny: ["VIEW_CHANNEL"],
+                type: "member"
+            },
+            {
+                id: interaction.guild.id,
+                deny: ["VIEW_CHANNEL"],
+                type: "role"
             }
-            channel.edit({permissionOverwrites: overwrites})
-            channel.setTopic(`${channel.topic.split(" ")[0]} Archived`);
-            let data = {
-                meta:{
-                    type: 'ticketArchive',
-                    displayName: 'Ticket Archived',
-                    calculateType: true,
-                    color: NucleusColors.yellow,
-                    emoji: 'GUILD.TICKET.ARCHIVED',
-                    timestamp: new Date().getTime()
-                },
-                list: {
-                    ticketFor: entry(channel.topic.split(" ")[0], renderUser((await interaction.guild.members.fetch(channel.topic.split(" ")[0])).user)),
-                    archivedBy: entry(interaction.member.user.id, renderUser(interaction.member.user)),
-                    archived: entry(new Date().getTime(), renderDelta(new Date().getTime())),
-                    ticketChannel: entry(channel.id, renderChannel(channel)),
-                },
-                hidden: {
-                    guild: interaction.guild.id
-                }
+        ] as Discord.OverwriteResolvable[];
+        if (config.tickets.supportRole != null) {
+            overwrites.push({
+                id: interaction.guild.roles.cache.get(config.tickets.supportRole),
+                allow: ["VIEW_CHANNEL", "SEND_MESSAGES", "ATTACH_FILES", "ADD_REACTIONS", "READ_MESSAGE_HISTORY"],
+                type: "role"
+            })
+        }
+        channel.edit({permissionOverwrites: overwrites})
+        channel.setTopic(`${channel.topic.split(" ")[0]} Archived`);
+        let data = {
+            meta:{
+                type: 'ticketClosed',
+                displayName: 'Ticket Closed',
+                calculateType: true,
+                color: NucleusColors.yellow,
+                emoji: 'GUILD.TICKET.ARCHIVED',
+                timestamp: new Date().getTime()
+            },
+            list: {
+                ticketFor: entry(channel.topic.split(" ")[0], renderUser((await interaction.guild.members.fetch(channel.topic.split(" ")[0])).user)),
+                closedBy: entry(interaction.member.user.id, renderUser(interaction.member.user)),
+                closed: entry(new Date().getTime(), renderDelta(new Date().getTime())),
+                ticketChannel: entry(channel.id, renderChannel(channel)),
+            },
+            hidden: {
+                guild: interaction.guild.id
             }
-            log(data, interaction.client);
-            await interaction.editReply({embeds: [new generateEmojiEmbed()
-                .setTitle("Close Ticket")
-                .setDescription("This ticket has been archived.\nType `/ticket close` to delete it.")
-                .setStatus("Warning")
-                .setEmoji("GUILD.TICKET.ARCHIVED") // TODO:[Premium] Add a transcript option  ||\----/|| <- the bridge we will cross when we come to it
-            ], components: [new MessageActionRow().addComponents([new MessageButton()
-                .setLabel("Close")
-                .setStyle("DANGER")
-                .setCustomId("closeticket")
-                .setEmoji(getEmojiByName("CONTROL.CROSS", "id"))
-            ])]});
-        }, 3000);
+        }
+        log(data, interaction.client);
+        await interaction.editReply({embeds: [new generateEmojiEmbed()
+            .setTitle("Close Ticket")
+            .setDescription("This ticket has been closed.\nType `/ticket close` again to delete it.")
+            .setStatus("Warning")
+            .setEmoji("GUILD.TICKET.ARCHIVED") // TODO:[Premium] Add a transcript option  ||\----/|| <- the bridge we will cross when we come to it
+        ], components: [new MessageActionRow().addComponents([new MessageButton()
+            .setLabel("Delete")
+            .setStyle("DANGER")
+            .setCustomId("closeticket")
+            .setEmoji(getEmojiByName("CONTROL.CROSS", "id"))
+        ])]});
         return;
     }
 }
