Ejemplo 1: enviar archivo 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"
]
});
Ejemplo 2: enviar archivo discord js v12
//For Discord.Js v12
const { MessageAttachment } = require("discord.js");
const file = new MessageAttachment("your_file.png");
//for a file on projects root if your file is in another subfolder just type the relative path to it
message.channel.send(file);
¡Haz clic para puntuar esta entrada!
(Votos: 0 Promedio: 0)