Trying to send a file with a text message, only sends text message #321
-
I'm trying to send a text message with an image attached in one message, but for some reason it only sends the text message. client.channels.cache.get('999999999999999999').send("My message", {files: [`./image.png`] }) This results in the client just sending "My message" without the image, however, when I do client.channels.cache.get('999999999999999999').send({files: [`./image.png`] }) It does send the image I really hope this isn't me overlooking something small and stupid but I've been stuck on this for a bit now trying to look online for answers |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
send function only accepts 1 variable client.channels.cache.get('999999999999999999').send({files: [`./image.png`], content: 'Goodbye world' }) |
Beta Was this translation helpful? Give feedback.
send function only accepts 1 variable
type of variable is string => message content
type of variable is object => message and option
Fix: