|
|
|
@ -42,6 +42,7 @@ const Discord = require("discord.js")
|
|
|
|
|
const bot = new Discord.Client()
|
|
|
|
|
|
|
|
|
|
const DIG = require("discord-image-generation");
|
|
|
|
|
> You can also destructure to avoid repeating DIG.
|
|
|
|
|
|
|
|
|
|
// Listen to the ready event
|
|
|
|
|
bot.on("ready", () => {
|
|
|
|
@ -54,7 +55,7 @@ bot.on("message", async (message) => {
|
|
|
|
|
// Get the avatarUrl of the user
|
|
|
|
|
let avatar = message.author.displayAvatarURL({ dynamic: false, format: 'png' });
|
|
|
|
|
// Make the image
|
|
|
|
|
let img = await new DIG.delete().getImage(avatar)
|
|
|
|
|
let img = await new DIG.Delete().getImage(avatar)
|
|
|
|
|
// Add the image as an attachement
|
|
|
|
|
let attach = new Discord.MessageAttachment(img, "delete.png");;
|
|
|
|
|
message.channel.send(attach)
|
|
|
|
@ -70,101 +71,101 @@ bot.login("super_secret_token")
|
|
|
|
|
|
|
|
|
|
## Filters
|
|
|
|
|
|
|
|
|
|
- ``new Blur().getImage(`<Avatar>`, `<Level(Number)>`);``
|
|
|
|
|
- ``new DIG.Blur().getImage(`<Avatar>`, `<Level(Number)>`);``
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
- ``new Gay().getImage(`<Avatar>`);``
|
|
|
|
|
- ``new DIG.Gay().getImage(`<Avatar>`);``
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
- ``new Greyscale().getImage(`<Avatar>`);``
|
|
|
|
|
- ``new DIG.Greyscale().getImage(`<Avatar>`);``
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
- ``new Invert().getImage(`<Avatar>`);``
|
|
|
|
|
- ``new DIG.Invert().getImage(`<Avatar>`);``
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
- ``new Sepia().getImage(`<Avatar>`);``
|
|
|
|
|
- ``new DIG.Sepia().getImage(`<Avatar>`);``
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Gifs
|
|
|
|
|
|
|
|
|
|
- ``new Blink().getImage(`<Avatar>`, `<Avatar2>`, <Timeout (Number in ms)>)``
|
|
|
|
|
- ``new DIG.Blink().getImage(`<Avatar>`, `<Avatar2>`, <Timeout (Number in ms)>)``
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
- ``new Triggered().getImage(`<Avatar>`);``
|
|
|
|
|
- ``new DIG.Triggered().getImage(`<Avatar>`);``
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Montage
|
|
|
|
|
|
|
|
|
|
- ``new Affect().getImage(`<Avatar>`);``
|
|
|
|
|
- ``new DIG.Affect().getImage(`<Avatar>`);``
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
- ``new Batslap().getImage(`<Avatar>`, `<Avatar2>`);``
|
|
|
|
|
- ``new DIG.Batslap().getImage(`<Avatar>`, `<Avatar2>`);``
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
- ``new Beautiful().getImage(`<Avatar>`);``
|
|
|
|
|
- ``new DIG.Beautiful().getImage(`<Avatar>`);``
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
- ``new Bed().getImage(`<Avatar>`, `<Avatar2>`);``
|
|
|
|
|
- ``new DIG.Bed().getImage(`<Avatar>`, `<Avatar2>`);``
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
- ``new Delete().getImage(`<Avatar>`);``
|
|
|
|
|
- ``new DIG.Delete().getImage(`<Avatar>`);``
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
- ``new Facepalm().getImage(`<Avatar>`);``
|
|
|
|
|
- ``new DIG.Facepalm().getImage(`<Avatar>`);``
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
- ``new Hitler().getImage(`<Avatar>`);``
|
|
|
|
|
- ``new DIG.Hitler().getImage(`<Avatar>`);``
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
- ``new Jail().getImage(`<Avatar>`);``
|
|
|
|
|
- ``new DIG.Jail().getImage(`<Avatar>`);``
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
- ``new Kiss().getImage(`<Avatar>`, `<Avatar2>`);``
|
|
|
|
|
- ``new DIG.Kiss().getImage(`<Avatar>`, `<Avatar2>`);``
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
- ``new Mms().getImage(`<Avatar>`);``
|
|
|
|
|
- ``new DIG.Mms().getImage(`<Avatar>`);``
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
- ``new Rip().getImage(`<Avatar>`);``
|
|
|
|
|
- ``new DIG.Rip().getImage(`<Avatar>`);``
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
- ``new Spank().getImage(`<Avatar>`, `<Avatar2>`);``
|
|
|
|
|
- ``new DIG.Spank().getImage(`<Avatar>`, `<Avatar2>`);``
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
- ``new Tatoo().getImage(`<Avatar>`)``
|
|
|
|
|
- ``new DIG.Tatoo().getImage(`<Avatar>`)``
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
- ``new Thomas().getImage(`<Avatar>`);``
|
|
|
|
|
- ``new DIG.Thomas().getImage(`<Avatar>`);``
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
- ``new Trash().getImage(`<Avatar>`);``
|
|
|
|
|
- ``new DIG.Trash().getImage(`<Avatar>`);``
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
- ``new Wanted().getImage(`<Avatar>`, `<Currency>`);``
|
|
|
|
|
- ``new DIG.Wanted().getImage(`<Avatar>`, `<Currency>`);``
|
|
|
|
|
|
|
|
|
|
> Currency ($, €, ...)
|
|
|
|
|
|
|
|
|
@ -173,11 +174,11 @@ bot.login("super_secret_token")
|
|
|
|
|
|
|
|
|
|
## Utils
|
|
|
|
|
|
|
|
|
|
- ``new Circle().getImage(`<Avatar>`);``
|
|
|
|
|
- ``new DIG.Circle().getImage(`<Avatar>`);``
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
- ``new Color().getImage(`<Color>`);``
|
|
|
|
|
- ``new DIG.Color().getImage(`<Color>`);``
|
|
|
|
|
|
|
|
|
|
> An hex color is needed, like "#FF0000"
|
|
|
|
|
|
|
|
|
|