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/commands/mod/purge.ts b/src/commands/mod/purge.ts
index 8644e26..004f5ff 100644
--- a/src/commands/mod/purge.ts
+++ b/src/commands/mod/purge.ts
@@ -318,7 +318,8 @@
)).map(message => message as Message);
const newOut = await client.database.transcripts.createTranscript(messageArray, interaction, interaction.member as GuildMember);
- const code = await client.database.transcripts.create(newOut);
+ const [code, key, iv] = await client.database.transcripts.create(newOut);
+
await interaction.editReply({
embeds: [
new EmojiEmbed()
@@ -329,7 +330,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),
+
])
]
});
diff --git a/src/commands/privacy.ts b/src/commands/privacy.ts
index 46784f5..dcdebb1 100644
--- a/src/commands/privacy.ts
+++ b/src/commands/privacy.ts
@@ -179,9 +179,11 @@
continue;
}
if (confirmation.success) {
- client.database.guilds.delete(interaction.guild!.id);
- client.database.history.delete(interaction.guild!.id);
- client.database.notes.delete(interaction.guild!.id);
+ await client.database.guilds.delete(interaction.guild!.id);
+ await client.database.history.delete(interaction.guild!.id);
+ await client.database.notes.delete(interaction.guild!.id);
+ await client.database.transcripts.deleteAll(interaction.guild!.id);
+
nextFooter = "All data cleared";
continue;
} else {