discord-image-generation is a powerfull module that allow you to generate awesome images.
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
Mr-KayJayDee 78a57d0bec 🐛 Fixed invalid main entry 5 years ago
src 📌 Added jsdoc 5 years ago
.gitignore Added first generations 5 years ago
README.md 📌 Added discord example 5 years ago
package.json 🐛 Fixed invalid main entry 5 years ago

README.md

Discord server

discord-image-generation

A powerfull module that allow you to generate awesome images.

Bugs and glitches

Feel free to report all bugs and glitches by creating an issue in the issue section.

A correct and understandable issue contains :

  • Steps to reproduce
  • Code that summonned the error
  • The complete error

You can also join me on my discord server.

Download

You can download it from npmjs.

npm i discord-image-generation

Configuration

The first step is to import the module in your code.

const DIG = require("discord-image-generation");

Then you have to request your image and send it as an attachement.

// Import the discord.js library.
const Discord = require("discord.js")
// Create a new discord.js client.
const bot = new Discord.Client()

const DIG = require("discord-image-generation");

// Listen to the ready event
bot.on("ready", () => {
    console.log("ok");  
})

// Listen to the message event
bot.on("message", async (message) => {
    if (message.content === "*delete") {
    	// Get the avatarUrl of the user
        let avatar = message.author.displayAvatarURL({ dynamic: false, format: 'png' });
        // Make the image
        let img = await DIG.delete(avatar)
        // Add the image as an attachement
        let attach = new Discord.MessageAttachment(img, "delete.png");;
        message.channel.send(attach)
    }
})

// Log in to the bot
bot.login("super_secret_token")

Available images

  • .blur(<Avatar>, <Level(Number)>);

Blur

  • .facepalm(<Avatar>);

Facepalm

  • .gay(<Avatar>);

Gay

  • .rip(<Avatar>);

RIP

  • .trash(<Avatar>);

Trash

  • .circle(<Avatar>);

Circle

  • .greyscale(<Avatar>);

Greyscale

  • .kiss(<Avatar>, <Avatar2>);

Kiss

  • .sepia(<Avatar>);

Sepia

  • .mms(<Avatar>);

MMS

  • .spank(<Avatar>, <Avatar2>);

Spank

  • .color(<Color>);

An hex color is needed, like "#FF0000"

Color

  • .triggered(<Avatar>);

Triggered

  • .hitler(<Avatar>);

Hitler

  • .batslap(<Avatar>, <Avatar2>);

Batslap

  • .bed(<Avatar>, <Avatar2>);

Bed

  • .invert(<Avatar>);

Invert

  • .wanted(<Avatar>);

Wanted

  • .beautiful(<Avatar>);

Beautiful

  • .jail(<Avatar>);

Jail

  • .affect(<Avatar>);

Affect

  • .delete(<Avatar>);

Delete