Closed errorcodezero closed 2 years ago
Hello, can you show me your code ?
const { Client, Intents } = require("discord.js");
const client = new Client({ intents: [Intents.FLAGS.GUILDS] });
const DIG = require("discord-image-generation");
client.once("ready", () => {
console.log(`Ready!`);
});
client.on("messageCreate", (message) => {
if (!message.content == "$triggered") {
const avatar = message.author.displayAvatarURL({
dynamic: false,
format: "png",
});
const img = DIG.Triggered().setImage(avatar);
message.channel.send({ files: [img] });
}
});
client.login(process.env.token);
You need to dynamically specify the image type when sending.
let attach = new Discord.MessageAttachment(img, "triggered.png");
Ohh okay thank you so much
The triggered command for some reason returned an image instead of a gif.