我已经制定了一个简单的方案,利用不和,我想把仍然的形象与含有im化框架的形象结合起来,那么,机器人将传播一个形象中的形象和仍然形象的背景。
const Discord = require( discord.js );
const sharp = require( sharp );
const client = new Discord.Client({ intents: ["GUILDS", "GUILD_MESSAGES"] });
client.on( messageCreate , async message => {
if (message.content === !merge ) {
const background = await sharp( logo.png ).resize(288, 288);
const overlay = await sharp( banana.gif ).resize(288, 288);
const result = await background.composite([{ input: await overlay.toBuffer(), gravity: center }]).toBuffer();
message.channel.send({ files: [result] });
}
});
client.login( your-token );
But the result was not successful, it sends a static image without the animated frames in GIF format.
I tried to search for a package, but did not find anything.
我们希望有人能够帮助我们这样做,感谢你。