Possible fix?

This commit is contained in:
Christopher Cookman 2024-06-11 15:19:42 -06:00
parent 5bdb2aae38
commit 858cdb2202
Signed by: ChrisChrome
GPG key ID: A023A26E42C33A42

View file

@ -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"
});
}