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 toolkit•8mo 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 docs•8mo ago
Documentation suggestion for @Lipton: :method: TextChannel#send() Sends a message to this channel. :interface: MessageCreateOptions The options for sending a message.
Lipton
Lipton•8mo ago
thing is im supplying an array with paths, so i dont think i can just add a description to them
mallusrgreat
mallusrgreat•8mo ago
see TextChannel#send() it doesn't accept 2 parameters
Lipton
Lipton•8mo ago
i am aware
Amgelo
Amgelo•8mo ago
your files property must be one of these types
No description
Amgelo
Amgelo•8mo 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
Lipton•8mo ago
it is an array, that is working fine i just want to add a message to the files that its sending
Amgelo
Amgelo•8mo ago
use what I mentioned then
mallusrgreat
mallusrgreat•8mo 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
Lipton•8mo ago
the voices
Want results from more Discord servers?
Add your server