diff --git a/TODO b/TODO
index 38073c6..2a0d7be 100644
--- a/TODO
+++ b/TODO
@@ -1,3 +1,2 @@
-Role all (?)
 Server rules
 verificationRequired on welcome
\ No newline at end of file
diff --git a/src/commands/mod/ban.ts b/src/commands/mod/ban.ts
index 7e67222..b500642 100644
--- a/src/commands/mod/ban.ts
+++ b/src/commands/mod/ban.ts
@@ -25,7 +25,7 @@
 const callback = async (interaction: CommandInteraction): Promise<void> => {
     if (!interaction.guild) return;
     const { renderUser } = client.logger;
-    // TODO:[Modals] Replace this with a modal
+    // TODO:[Modals] Replace the command arguments with a modal
     let reason = null;
     let notify = true;
     let confirmation;
diff --git a/src/premium/createTranscript.ts b/src/premium/createTranscript.ts
index 754a06b..43de767 100644
--- a/src/premium/createTranscript.ts
+++ b/src/premium/createTranscript.ts
@@ -7,7 +7,8 @@
     MessageComponentInteraction,
     TextChannel,
     ButtonStyle,
-    User
+    User,
+    ComponentType
 } from "discord.js";
 import EmojiEmbed from "../utils/generateEmojiEmbed.js";
 import getEmojiByName from "../utils/getEmojiByName.js";
@@ -16,6 +17,64 @@
 
 const pbClient = new PasteClient(client.config.pastebinApiKey);
 
+interface TranscriptEmbed {
+    title?: string;
+    description?: string;
+    fields?: {
+        name: string;
+        value: string;
+        inline: boolean;
+    }[];
+    footer?: {
+        text: string;
+        iconURL?: string;
+    };
+}
+
+interface TranscriptComponent {
+    type: number;
+    style?: ButtonStyle;
+    label?: string;
+    description?: string;
+    placeholder?: string;
+    emojiURL?: string;
+}
+
+interface TranscriptAuthor {
+    username: string;
+    discriminator: number;
+    nickname?: string;
+    id: string;
+    iconURL?: string;
+    topRole: {
+        color: number;
+        badgeURL?: string;
+    }
+}
+
+interface TranscriptMessage {
+    id: string;
+    author: TranscriptAuthor;
+    content?: string;
+    embeds?: TranscriptEmbed[];
+    components?: TranscriptComponent[][];
+    editedTimestamp?: number;
+    createdTimestamp: number;
+    flags?: string[];
+    attachments?: unknown; //FIXME
+    stickerURLs?: string[];
+    referencedMessage?: string | [string, string, string];
+}
+
+interface Transcript {
+    type: "ticket" | "purge"
+    guild: string;
+    channel: string;
+    messages: TranscriptMessage[];
+    createdTimestamp: number;
+    createdBy: TranscriptAuthor;
+}
+
 export default async function (interaction: CommandInteraction | MessageComponentInteraction) {
     if (interaction.channel === null) return;
     if (!(interaction.channel instanceof TextChannel)) return;
@@ -45,6 +104,75 @@
             out += "\n\n";
         }
     });
+
+    let interactionMember = await interaction.guild?.members.fetch(interaction.user.id)
+
+    let newOut: Transcript = {
+        type: "ticket",
+        guild: interaction.guild!.id,
+        channel: interaction.channel!.id,
+        messages: [],
+        createdTimestamp: Date.now(),
+        createdBy: {
+            username: interaction.user.username,
+            discriminator: parseInt(interaction.user.discriminator),
+            id: interaction.user.id,
+            topRole: {
+                color: interactionMember?.roles.highest.color ?? 0x000000
+            }
+        }
+    }
+    if(interactionMember?.roles.icon) newOut.createdBy.topRole.badgeURL = interactionMember.roles.icon.iconURL()!;
+    messages.reverse().forEach((message) => {
+        let msg: TranscriptMessage = {
+            id: message.id,
+            author: {
+                username: message.author.username,
+                discriminator: parseInt(message.author.discriminator),
+                id: message.author.id,
+                topRole: {
+                    color: message.member!.roles.highest.color
+                }
+            },
+            createdTimestamp: message.createdTimestamp
+        };
+        if (message.member!.roles.icon) msg.author.topRole.badgeURL = message.member!.roles.icon.iconURL()!;
+        if (message.content) msg.content = message.content;
+        if (message.embeds.length > 0) msg.embeds = message.embeds.map(embed => {
+            let obj: TranscriptEmbed = {};
+            if (embed.title) obj.title = embed.title;
+            if (embed.description) obj.description = embed.description;
+            if (embed.fields.length > 0) obj.fields = embed.fields.map(field => {
+                return {
+                    name: field.name,
+                    value: field.value,
+                    inline: field.inline ?? false
+                }
+            });
+            if (embed.footer) obj.footer = {
+                text: embed.footer.text,
+            };
+            if (embed.footer?.iconURL) obj.footer!.iconURL = embed.footer.iconURL;
+            return obj;
+        });
+        if (message.components.length > 0) msg.components = message.components.map(component => component.components.map(child => {
+            let obj: TranscriptComponent = {
+                type: child.type
+            }
+            if (child.type === ComponentType.Button) {
+                obj.style = child.style;
+                obj.label = child.label ?? "";
+            }
+            return obj
+        }));
+        if (message.editedTimestamp) msg.editedTimestamp = message.editedTimestamp;
+        if (message.flags) msg.flags = message.flags.toArray();
+
+        if (message.stickers.size > 0) msg.stickerURLs = message.stickers.map(sticker => sticker.url);
+        if (message.reference) msg.referencedMessage = [message.reference.guildId ?? "", message.reference.channelId, message.reference.messageId ?? ""];
+
+    });
+
     const topic = interaction.channel.topic;
     let member: GuildMember | null = null;
     if (topic !== null) {
