From ab4c6a5c474ecae0746d4938ab3d72ad4127fe31 Mon Sep 17 00:00:00 2001 From: Killian Date: Mon, 15 Jun 2020 23:10:48 +0200 Subject: [PATCH] Fixed examples --- README.md | 53 +++++++++++++++++++++++++++-------------------------- 1 file changed, 27 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index 5fb9fd8..efb692a 100644 --- a/README.md +++ b/README.md @@ -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(``, ``);`` +- ``new DIG.Blur().getImage(``, ``);`` ![Blur](https://imgur.com/JqpNFTY.png) -- ``new Gay().getImage(``);`` +- ``new DIG.Gay().getImage(``);`` ![Gay](https://imgur.com/BDTrXzZ.png) -- ``new Greyscale().getImage(``);`` +- ``new DIG.Greyscale().getImage(``);`` ![Greyscale](https://imgur.com/h3ahY7Z.png) -- ``new Invert().getImage(``);`` +- ``new DIG.Invert().getImage(``);`` ![Invert](https://imgur.com/Rl0wGQM.png) -- ``new Sepia().getImage(``);`` +- ``new DIG.Sepia().getImage(``);`` ![Sepia](https://imgur.com/OTbKVtj.png) ## Gifs -- ``new Blink().getImage(``, ``, )`` +- ``new DIG.Blink().getImage(``, ``, )`` ![Blink](https://imgur.com/JjUXmRU.gif) -- ``new Triggered().getImage(``);`` +- ``new DIG.Triggered().getImage(``);`` ![Triggered](https://imgur.com/0QvyYQa.gif) ## Montage -- ``new Affect().getImage(``);`` +- ``new DIG.Affect().getImage(``);`` ![Affect](https://imgur.com/g4Gaehb.png) -- ``new Batslap().getImage(``, ``);`` +- ``new DIG.Batslap().getImage(``, ``);`` ![Batslap](https://imgur.com/oYMpa5A.png) -- ``new Beautiful().getImage(``);`` +- ``new DIG.Beautiful().getImage(``);`` ![Beautiful](https://imgur.com/HGZkmXo.png) -- ``new Bed().getImage(``, ``);`` +- ``new DIG.Bed().getImage(``, ``);`` ![Bed](https://imgur.com/b1idSnr.png) -- ``new Delete().getImage(``);`` +- ``new DIG.Delete().getImage(``);`` ![Delete](https://imgur.com/6V1IYJp.png) -- ``new Facepalm().getImage(``);`` +- ``new DIG.Facepalm().getImage(``);`` ![Facepalm](https://imgur.com/cdPC3P1.png) -- ``new Hitler().getImage(``);`` +- ``new DIG.Hitler().getImage(``);`` ![Hitler](https://imgur.com/wK9puxH.png) -- ``new Jail().getImage(``);`` +- ``new DIG.Jail().getImage(``);`` ![Jail](https://imgur.com/QslACNo.png) -- ``new Kiss().getImage(``, ``);`` +- ``new DIG.Kiss().getImage(``, ``);`` ![Kiss](https://imgur.com/sSoCAeH.png) -- ``new Mms().getImage(``);`` +- ``new DIG.Mms().getImage(``);`` ![MMS](https://imgur.com/nH3URHb.png) -- ``new Rip().getImage(``);`` +- ``new DIG.Rip().getImage(``);`` ![RIP](https://imgur.com/MgsRH8o.png) -- ``new Spank().getImage(``, ``);`` +- ``new DIG.Spank().getImage(``, ``);`` ![Spank](https://imgur.com/VRvogo7.png) -- ``new Tatoo().getImage(``)`` +- ``new DIG.Tatoo().getImage(``)`` ![Tatoo](https://imgur.com/wJju4UJ.png) -- ``new Thomas().getImage(``);`` +- ``new DIG.Thomas().getImage(``);`` ![Thomas](https://imgur.com/7R37J2j.png) -- ``new Trash().getImage(``);`` +- ``new DIG.Trash().getImage(``);`` ![Trash](https://imgur.com/nwAHGgF.png) -- ``new Wanted().getImage(``, ``);`` +- ``new DIG.Wanted().getImage(``, ``);`` > Currency ($, €, ...) @@ -173,11 +174,11 @@ bot.login("super_secret_token") ## Utils -- ``new Circle().getImage(``);`` +- ``new DIG.Circle().getImage(``);`` ![Circle](https://imgur.com/0Zo8NYS.png) -- ``new Color().getImage(``);`` +- ``new DIG.Color().getImage(``);`` > An hex color is needed, like "#FF0000"