From 14c8c8fba34b73a8c999e23a9c61fa4479b9c92b Mon Sep 17 00:00:00 2001 From: Lamp Date: Tue, 4 Jan 2022 16:28:12 -0800 Subject: [PATCH] Fuck 'cannot send an empty message' --- mppbridger.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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));