Development (#12)

Co-authored-by: PineaFan <ash@pinea.dev>
Co-authored-by: pineafan <pineapplefanyt@gmail.com>
Co-authored-by: PineappleFan <PineaFan@users.noreply.github.com>
Co-authored-by: Skyler <skyler3665@gmail.com>
diff --git a/src/context/messages/purgeto.ts b/src/context/messages/purgeto.ts
index aef159b..616b085 100644
--- a/src/context/messages/purgeto.ts
+++ b/src/context/messages/purgeto.ts
@@ -193,7 +193,9 @@
         )
     )).map(message => message as Message);
     const transcript = await client.database.transcripts.createTranscript(messageArray, interaction, interaction.member as GuildMember);
-    const code = await client.database.transcripts.create(transcript);
+
+    const [code, key, iv] = await client.database.transcripts.create(transcript);
+
     await interaction.editReply({
         embeds: [
             new EmojiEmbed()
@@ -204,7 +206,9 @@
         ],
         components: [
             new Discord.ActionRowBuilder<ButtonBuilder>().addComponents([
-                new ButtonBuilder().setLabel("View").setStyle(ButtonStyle.Link).setURL(`https://clicks.codes/nucleus/transcript?code=${code}`),
+
+                new ButtonBuilder().setLabel("View").setStyle(ButtonStyle.Link).setURL(`https://clicks.codes/nucleus/transcript/${code}?key=${key}&iv=${iv}`).setDisabled(!code),
+
             ])
         ]
     });