Possible fix?
This commit is contained in:
parent
5bdb2aae38
commit
858cdb2202
8
index.js
8
index.js
|
@ -1336,9 +1336,13 @@ dcClient.on('interactionCreate', async interaction => {
|
||||||
result.unshift(fields);
|
result.unshift(fields);
|
||||||
const csv = json2csv(result);
|
const csv = json2csv(result);
|
||||||
const buffer = Buffer.from(csv, 'utf-8');
|
const buffer = Buffer.from(csv, 'utf-8');
|
||||||
const attachment = new MessageAttachment(buffer, 'cdr.csv');
|
|
||||||
interaction.editReply({
|
interaction.editReply({
|
||||||
files: [attachment],
|
files: [
|
||||||
|
{
|
||||||
|
attachment: buffer,
|
||||||
|
name: "cdr.csv"
|
||||||
|
}
|
||||||
|
],
|
||||||
content: "Here are your CDR records"
|
content: "Here are your CDR records"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue