message.channel.sendMessage(text).attachments
["",{url:"http://openweathermap.org/img/w/"+icon+".png" }];
I made some bot, with node-js ( discord.js )
.
I want to send message with picture(without URL) so, I found fuction attachments, in documentation. But, when I put in message (text) and attachments some picture, in the console,I get:
"Cannot read property '# < Object >' of undefined"
What should I do fix this problem?
According to the docs, you will need to pass an object containing the file URL or a FileOptions object. You would do this like