Discord-Images is a npm to make image generation easier!
To install this npm just do:
npmigenimage
Examples
Discord.JS
constDiscord=require('discord.js');//npm i discord.jsconstclient=newDiscord.Client();//making the discord.js clientconstdiscordImageGen=require("genimage");client.on('ready',()=>console.log("Ready!"));client.on("message",asyncmessage=>{constprefix="!";//feel free to change this.if(message.author.bot||message.channel.type==="dm"||!message.content.startsWith(prefix))return;if(message.content===prefix+"communism"){constuser=message.mentions.users.first()||message.author;constimage=awaitdiscordImageGen.communism(user.displayAvatarURL({dynamic: false,format: "png"}));constimg=newDiscord.MessageAttachment(image,"communism.png")message.channel.send(img)};});client.login("super_secret_bot.token")// Your bot's token from the developer portal