Can't send attachment from buffer

i made a bot that preview STL files, but got an error when trying to send the message, Code and error is below
10 Replies
d.js toolkit
d.js toolkit11mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button!
5UP3R_D1N
5UP3R_D1N11mo ago
well i cant send the code ig i will send the whole bot (theres nothing much)
5UP3R_D1N
5UP3R_D1N11mo ago
wait
5UP3R_D1N
5UP3R_D1N11mo ago
i get this error from error.rawError.errors.attachments["0"].id._errors
5UP3R_D1N
5UP3R_D1N11mo ago
it said i need to put id which this is buffer bruh i dont know whats going on please do not mention my skill issue on Object.values(GatewayIntentBits)
d.js docs
d.js docs11mo ago
To share long code snippets use a service like gist, sourcebin, starbin, or similar instead of posting them as large code blocks.
5UP3R_D1N
5UP3R_D1N11mo ago
a ok this time not codeboard https://sourceb.in/jaMNzZEA5K i need to pass buffer to files array first? but it also contain attachment from user should i keep that attachment on attachments and move buffer to files? so i should convert both to files, but how? (i always use attachments) so not much changes needed what syntax do i use for files:? i changed to files and got 1 to work, but the thumbnail doesnt come up("thumbnail" from files:)
5UP3R_D1N
5UP3R_D1N11mo ago
5UP3R_D1N
5UP3R_D1N11mo ago
(the name is generated by tinkercad, not me) ;-; fetch have only .arrayBuffer(), which i convert it into buffer, and in attachmentbuilder, .toBuffer() somehow return arrayBuffer instead stl did render without error, so i guess the fetch's conversion is fine i got it to work by adding extension to the image! tysm again!