Idk how this works

This commit is contained in:
Christopher Cookman 2024-03-24 04:01:36 -06:00
parent b1c9450813
commit 3fda780cf3
Signed by: ChrisChrome
GPG key ID: A023A26E42C33A42

View file

@ -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`
}