2.0.4 • Published 5 years ago
image-generation-for-discord v2.0.4
image-generation-for-discord is a npm to make image generation commands easier!
To install this npm just do:
npm i image-generation-for-discordHere is a basic bot to show how this npm works!
const Discord = require('discord.js');
//npm i discord.js
const client = new Discord.Client();
//making the discord.js client
const discordImageGen = require("image-generation-for-discord");
client.on('ready', () => console.log("Ready!"));
client.on("message", async message => {
const prefix = "!";
//feel free to change this.
if(message.author.bot || message.channel.type === "dm" || !message.content.startsWith(prefix)) return;
if (message.content === prefix + "communism") {
const user = message.mentions.users.first() || message.author;
const image = await discordImageGen.communism(user.displayAvatarURL({ dynamic: false, format: "png" }));
const img = new Discord.MessageAttachment(image, "communism.png")
message.channel.send(img)
};
});
client.login("super_secret_bot_token")Semi advanced version of that:
const Discord = require('discord.js')
const discordImgGen = require('image-generation-for-discord')
//make sure to add your command handler to this
var user = message.mentions.users.first() || client.users.cache.get(args[0])
//change client to bot if you defined a discord client to bot
if(!user || !args[0]) {
var user = message.author
}
const image = await discordImgGen.communism(user.avatarURL({ dynamic: false, format: "png" }))
message.channel.send(new Discord.MessageAttachment(image, "communism.png"))If you need any support make sure to join the support sever
Here is all valid functions:
discordImgGen.alert(<image url>)discordImgGen.batslap(<image url1>, <image url2>)discordImgGen.burn(<text>)discordImgGen.caution(<image url>)discordImgGen.chineserestaurantsign(<text>)discordImgGen.cursedspongebob(<amount>)discordImgGen.danger(<text>)discordImgGen.dexter(<image url>)discordImgGen.dislike(<image url>)discordImgGen.drake(<nha text>, <yeah text>)discordImgGen.gay(<image url>)discordImgGen.genierules(<text>)discordImgGen.thisguy(<image url>)discordImgGen.girlworthfightingfor(<image url>)discordImgGen.gruplan(<step1>, <step2>, <step3>)discordImgGen.heman(<image url>)discordImgGen.hollywoodstar(<name>)discordImgGen.couldread(<text>)discordImgGen.kannapaper(<text>)discordImgGen.lisa(<text>)discordImgGen.mycollectiongrows(<image url>)discordImgGen.panik(<panik>, <kalm>, <panik2>)discordImgGen.rip(<image url>)discordImgGen.roadsign(<text>)discordImgGen.spidermanpointing(<first text>, <second text>)discordImgGen.spongebobtimecard(<text>)discordImgGen.strongpassword(<weak password>, <strong password>)discordImgGen.thatsignwontstopme(<text>)discordImgGen.tuxedopooh(<normal text>, <tuxedo text>)discordImgGen.twobuttons(<first button>, <second text>)discordImgGen.worthless(<image url>)discordImgGen.communism(<image url>)discordImgGen.avatarfusion(<image url1> <image url2>)discordImgGen.snapchat(<text>, <image url>)discordImgGen.facts(<fact>)discordImgGen.deepfry(<image url>)discordImgGen.itsbeenyears(<image url>)discordImgGen.motionblur(<image url>)discordImgGen.color(<color>)discordImgGen.facepulm(<image url>)discordImgGen.trash(<image url>)discordImgGen.blur(<image url>)discordImgGen.geryscale(<image url>)discordImgGen.invert(<image url>)discordImgGen.sepia(<image url>)