This commit is contained in:
Christopher Cookman 2025-06-17 16:39:33 -06:00
parent f79185dc85
commit ba9119c643

View file

@ -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