diff --git a/README.md b/README.md index 4fad523..5f28202 100644 --- a/README.md +++ b/README.md @@ -354,6 +354,9 @@ bot.login("super_secret_token"); # Changelog +## v1.4.22 +- Fixed some bugs + ## v1.4.21 - Added discord.js V14 usage example - Removed discord.js V12 usage example @@ -362,7 +365,7 @@ bot.login("super_secret_token"); - Some fixes - Added Clown() (thanks to Retrojection#1937) - Added Deepfry() (thanks to Retrojection#1937) -- Added Hearbreaking() (thanks to Retrojection#1937) +- Added Heartbreaking() (thanks to Retrojection#1937) - Added Mikkelsen() (thanks to Retrojection#1937) - Added Snyder() (thanks to Retrojection#1937) diff --git a/package.json b/package.json index 118f8f0..134de6b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "discord-image-generation", - "version": "1.4.21", + "version": "1.4.22", "description": "discord-image-generation is a powerful module that allow you to generate awesome images.", "main": "src/index.js", "scripts": { diff --git a/src/module/montage/clown.js b/src/module/montage/clown.js index d187fd2..4812b58 100644 --- a/src/module/montage/clown.js +++ b/src/module/montage/clown.js @@ -14,7 +14,7 @@ module.exports = class Clown { } if (!image) throw new Error(`You must provide an image as an argument`); - let isValid = await validateURL(img1); + let isValid = await validateURL(image); if (!isValid) return console.error(`You must provide a valid image URL or buffer.`); const canvas = Canvas.createCanvas(610, 343); const ctx = canvas.getContext(`2d`); diff --git a/src/module/montage/confusedStonk.js b/src/module/montage/confusedStonk.js index 545c2a2..18d2c68 100644 --- a/src/module/montage/confusedStonk.js +++ b/src/module/montage/confusedStonk.js @@ -1,11 +1,11 @@ const Jimp = require('jimp'); const { validateURL } = require(`../functions`); module.exports = class ConfusedStonk { - async getImage(img1) { - if (!img1) return console.error(`You must provide an image as an argument`); - let isValid = await validateURL(img1); + async getImage(image) { + if (!image) return console.error(`You must provide an image as an argument`); + let isValid = await validateURL(image); if (!isValid) return console.error(`You must provide a valid image URL or buffer.`); - const image1 = await Jimp.read(img1); + const image1 = await Jimp.read(image); const background = await Jimp.read(`${__dirname}/../../assets/confusedStonk.png`); image1.resize(400, 400); const compositeImage = new Jimp(background.getWidth(), background.getHeight(), 0xFFFFFFFF); diff --git a/src/module/montage/deepfry.js b/src/module/montage/deepfry.js index cfe7961..ae1c725 100644 --- a/src/module/montage/deepfry.js +++ b/src/module/montage/deepfry.js @@ -7,7 +7,6 @@ module.exports = class Deepfry { let isValid = await validateURL(image); if (!isValid) return console.error(`You must provide a valid image URL or buffer.`); image = await jimp.read(image); - image.resize(500, 500); image.quality(2) image.contrast(1); image.pixelate(2); diff --git a/src/module/montage/discordBlack.js b/src/module/montage/discordBlack.js index c1023d5..cfc506b 100644 --- a/src/module/montage/discordBlack.js +++ b/src/module/montage/discordBlack.js @@ -1,12 +1,12 @@ const Jimp = require('jimp'); const { validateURL } = require(`../functions`); module.exports = class DiscordBlack { - async getImage(img1) { - if (!img1) return console.error(`You must provide an image as an argument`); - let isValid = await validateURL(img1); + async getImage(image) { + if (!image) return console.error(`You must provide an image as an argument`); + let isValid = await validateURL(image); if (!isValid) return console.error(`You must provide a valid image URL or buffer.`); const background = await Jimp.read(`${__dirname}/../../assets/discordblack.png`); - const image1 = await Jimp.read(img1); + const image1 = await Jimp.read(image); image1.resize(background.getWidth(), background.getHeight()); const compositeImage = new Jimp(background.getWidth(), background.getHeight(), 0xFFFFFFFF); compositeImage.composite(image1, 0, 0); diff --git a/src/module/montage/discordBlue.js b/src/module/montage/discordBlue.js index 1ce105a..35153b3 100644 --- a/src/module/montage/discordBlue.js +++ b/src/module/montage/discordBlue.js @@ -1,12 +1,12 @@ const Jimp = require('jimp'); const { validateURL } = require(`../functions`); module.exports = class DiscordBlue { - async getImage(img1) { - if (!img1) return console.error(`You must provide an image as an argument`); - let isValid = await validateURL(img1); + async getImage(image) { + if (!image) return console.error(`You must provide an image as an argument`); + let isValid = await validateURL(image); if (!isValid) return console.error(`You must provide a valid image URL or buffer.`); const background = await Jimp.read(`${__dirname}/../../assets/discordblue.png`); - const image1 = await Jimp.read(img1); + const image1 = await Jimp.read(image); image1.resize(background.getWidth(), background.getHeight()); const compositeImage = new Jimp(background.getWidth(), background.getHeight(), 0xFFFFFFFF); compositeImage.composite(image1, 0, 0); diff --git a/src/module/montage/heartbreaking.js b/src/module/montage/heartbreaking.js index 632810b..94b9eb7 100644 --- a/src/module/montage/heartbreaking.js +++ b/src/module/montage/heartbreaking.js @@ -4,7 +4,7 @@ const { validateURL } = require(`../functions`); module.exports = class Heartbreaking { async getImage(image) { if (!image) throw new Error(`You must provide an image as an argument`); - let isValid = await validateURL(img1); + let isValid = await validateURL(image); if (!isValid) return console.error(`You must provide a valid image URL or buffer.`); const canvas = Canvas.createCanvas(610, 797); const ctx = canvas.getContext(`2d`); diff --git a/src/module/montage/mikkelsen.js b/src/module/montage/mikkelsen.js index 1631c2c..be3e341 100644 --- a/src/module/montage/mikkelsen.js +++ b/src/module/montage/mikkelsen.js @@ -4,7 +4,7 @@ const { validateURL } = require(`../functions`); module.exports = class Mikkelsen { async getImage(image) { if (!image) throw new Error(`You must provide an image as an argument`); - let isValid = await validateURL(img1); + let isValid = await validateURL(image); if (!isValid) return console.error(`You must provide a valid image URL or buffer.`); const canvas = Canvas.createCanvas(610, 955); const ctx = canvas.getContext(`2d`); diff --git a/src/module/montage/snyder.js b/src/module/montage/snyder.js index 8fe994f..32328bb 100644 --- a/src/module/montage/snyder.js +++ b/src/module/montage/snyder.js @@ -14,7 +14,7 @@ module.exports = class Snyder { } if (!image) throw new Error(`You must provide an image as an argument`); - let isValid = await validateURL(img1); + let isValid = await validateURL(image); if (!isValid) return console.error(`You must provide a valid image URL or buffer.`); const canvas = Canvas.createCanvas(610, 343); const ctx = canvas.getContext(`2d`);