From 858cdb2202626d44d7d6065a0d1aa410aa982f11 Mon Sep 17 00:00:00 2001 From: ChrisChrome Date: Tue, 11 Jun 2024 15:19:42 -0600 Subject: [PATCH] Possible fix? --- index.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 7dbae24..f4f3d34 100644 --- a/index.js +++ b/index.js @@ -1336,9 +1336,13 @@ dcClient.on('interactionCreate', async interaction => { result.unshift(fields); const csv = json2csv(result); const buffer = Buffer.from(csv, 'utf-8'); - const attachment = new MessageAttachment(buffer, 'cdr.csv'); interaction.editReply({ - files: [attachment], + files: [ + { + attachment: buffer, + name: "cdr.csv" + } + ], content: "Here are your CDR records" }); }