diff --git a/mppbridger.js b/mppbridger.js index f760144..6e6fcbf 100644 --- a/mppbridger.js +++ b/mppbridger.js @@ -193,7 +193,10 @@ global.createMPPbridge = async function createMPPbridge({room, channel, uri}) { // addons var wsc = new WebSocketMessageCollector(async function(data, startDate, endDate) { var attachmentName = `${uri} ${room} raw data recording from ${startDate.toISOString()} to ${endDate.toISOString()} .txt.gz`; - await channel.send(new Discord.MessageAttachment(data, attachmentName)); + await channel.send({files:[{ + attachment: data, + name: attachmentName + }]}); }); gClient.on("message", wsc.collect.bind(wsc));