From 3fda780cf30984b1270910c224fe3744249846ae Mon Sep 17 00:00:00 2001 From: ChrisChrome Date: Sun, 24 Mar 2024 04:01:36 -0600 Subject: [PATCH] Idk how this works --- index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index f28a451..4f988f0 100644 --- a/index.js +++ b/index.js @@ -1177,7 +1177,10 @@ dcClient.on('interactionCreate', async interaction => { if (outputStream.length > 2000) { // make the buffer const buffer = Buffer.from(outputStream, 'utf-8'); - const attachment = new Discord.MessageAttachment(buffer, 'output.txt'); + const attachment = { + name: "output.txt", + content: buffer + } msgJson.files = [attachment]; msgJson.content = `Ran command \`${cmd}\`\nOutput too long, sending as a file` }