how can i send both a message and multiple files at the same time?

im trying something like channel.send("message",{files: res}) but its not working
11 Replies
d.js toolkit
d.js toolkit10mo 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!
d.js docs
d.js docs10mo ago
Documentation suggestion for @Lipton: :method: TextChannel#send() Sends a message to this channel. :interface: MessageCreateOptions The options for sending a message.
Lipton
LiptonOP10mo ago
thing is im supplying an array with paths, so i dont think i can just add a description to them
mallusrgreat
mallusrgreat10mo ago
see TextChannel#send() it doesn't accept 2 parameters
Lipton
LiptonOP10mo ago
i am aware
Amgelo
Amgelo10mo ago
your files property must be one of these types
No description
Amgelo
Amgelo10mo ago
it should be channel.send({content: "message", files: res}) but if res is an array of something else it won't work either, it must be one of those types
Lipton
LiptonOP10mo ago
it is an array, that is working fine i just want to add a message to the files that its sending
Amgelo
Amgelo10mo ago
use what I mentioned then
mallusrgreat
mallusrgreat10mo ago
if you are already aware of this then why don't you do it in the code? why did you pass in 2 options even though you know that it only accepts 1
Lipton
LiptonOP10mo ago
the voices
Want results from more Discord servers?
Add your server