Answers for "discordjs send message with file"

2

send file discord.js

message.channel.send("Testing message.", { files: ["./images/headpat1.png"] });
//pls like if this worked!

// The file variable has to be an array 
// even if you want to send one file. 
// But because it is an array you can send multiples files. 

// For exemple:
message.channel.send("Testing message.", {
  files: [
    "./images/headpat1.png",
    "./images/headpat2.png"
  ]
});
Posted by: Guest on December-23-2020

Code answers related to "discordjs send message with file"

Code answers related to "Javascript"

Browse Popular Code Answers by Language