Fixed some bugs

main
Mr¤KayJayDee 2 years ago
parent 5830a76096
commit fbdedebefd

@ -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)

@ -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": {

@ -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`);

@ -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);

@ -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);

@ -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);

@ -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);

@ -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`);

@ -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`);

@ -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`);

Loading…
Cancel
Save