From ba9119c6434f393c7b49f7af5f9db98a396382c7 Mon Sep 17 00:00:00 2001 From: ChrisChrome Date: Tue, 17 Jun 2025 16:39:33 -0600 Subject: [PATCH] Guh --- interactions/commands/add.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/interactions/commands/add.js b/interactions/commands/add.js index 8fee942..7ad79dc 100644 --- a/interactions/commands/add.js +++ b/interactions/commands/add.js @@ -20,9 +20,10 @@ const execute = async (interaction, db, client) => { const attachments = []; for (let i = 1; i <= 4; i++) { const attachment = interaction.options.getAttachment(`attachment${i}`); + const fileExt = attachment.name ? path.extname(attachment.name) : ''; if (attachment) { const url = attachment.url; - const filename = `${user.id}-${i}`; + const filename = `${user.id}-${i}${attachment}.${fileExt}`; const filepath = path.join(__dirname, '../../storage', filename); // Await the download before continuing