Fixed invalid paths

This commit is contained in:
2020-06-16 10:47:54 +02:00
parent 164ea5adbd
commit 492ad845fa
38 changed files with 23 additions and 19 deletions

View File

Before

Width:  |  Height:  |  Size: 116 KiB

After

Width:  |  Height:  |  Size: 116 KiB

View File

Before

Width:  |  Height:  |  Size: 581 KiB

After

Width:  |  Height:  |  Size: 581 KiB

View File

Before

Width:  |  Height:  |  Size: 342 KiB

After

Width:  |  Height:  |  Size: 342 KiB

View File

Before

Width:  |  Height:  |  Size: 98 KiB

After

Width:  |  Height:  |  Size: 98 KiB

View File

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

View File

Before

Width:  |  Height:  |  Size: 324 KiB

After

Width:  |  Height:  |  Size: 324 KiB

View File

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

View File

Before

Width:  |  Height:  |  Size: 49 KiB

After

Width:  |  Height:  |  Size: 49 KiB

View File

Before

Width:  |  Height:  |  Size: 80 KiB

After

Width:  |  Height:  |  Size: 80 KiB

View File

Before

Width:  |  Height:  |  Size: 1.0 MiB

After

Width:  |  Height:  |  Size: 1.0 MiB

View File

Before

Width:  |  Height:  |  Size: 129 KiB

After

Width:  |  Height:  |  Size: 129 KiB

View File

Before

Width:  |  Height:  |  Size: 188 KiB

After

Width:  |  Height:  |  Size: 188 KiB

View File

Before

Width:  |  Height:  |  Size: 623 KiB

After

Width:  |  Height:  |  Size: 623 KiB

View File

Before

Width:  |  Height:  |  Size: 675 KiB

After

Width:  |  Height:  |  Size: 675 KiB

View File

Before

Width:  |  Height:  |  Size: 468 KiB

After

Width:  |  Height:  |  Size: 468 KiB

View File

Before

Width:  |  Height:  |  Size: 743 KiB

After

Width:  |  Height:  |  Size: 743 KiB

View File

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 41 KiB

View File

Before

Width:  |  Height:  |  Size: 119 KiB

After

Width:  |  Height:  |  Size: 119 KiB

View File

@@ -7,7 +7,7 @@ module.exports = class Gay {
*/
async getImage(image) {
if (!image) throw new Error(`You must provide an image.`);
let bg = await Canvas.loadImage(`../src/module/assets/gay.png`);
let bg = await Canvas.loadImage(`../src/assets/gay.png`);
let img = await Canvas.loadImage(image);
const canvas = Canvas.createCanvas(480, 480);
const ctx = canvas.getContext(`2d`);

View File

@@ -11,7 +11,7 @@ module.exports = class Triggered {
async getImage(image, timeout = 15) {
if (!image) throw new Error(`You must provide an image.`);
if (isNaN(timeout)) throw new Error(`The timeout argument must be a number.`)
const base = await Canvas.loadImage(`../src/module/assets/triggered.png`);
const base = await Canvas.loadImage(`../src/assets/triggered.png`);
const img = await Canvas.loadImage(image);
const GIF = new GIFEncoder(256, 310)
GIF.start();

View File

@@ -7,7 +7,7 @@ module.exports = class Affect {
*/
async getImage(image) {
if (!image) throw new Error("You must provide an image.");
let base = await jimp.read(`../src/module/assets/affect.png`);
let base = await jimp.read(`../src/assets/affect.png`);
let img = await jimp.read(image);
img.resize(200, 157);
base.composite(img, 180, 383);

View File

@@ -9,7 +9,7 @@ module.exports = class Batslap {
async getImage(image1, image2) {
if (!image1) throw new Error("You must provide an image as a first argument.");
if (!image2) throw new Error("You must provide an image as a second argument.");
let base = await jimp.read(`../src/module/assets/batslap.png`);
let base = await jimp.read(`../src/assets/batslap.png`);
image1 = await jimp.read(image1);
image2 = await jimp.read(image2);
image1.circle();

View File

@@ -7,7 +7,7 @@ module.exports = class Beautiful {
*/
async getImage(image) {
if (!image) throw new Error("You must provide an image.");
let base = await jimp.read(`../src/module/assets/beautiful.png`);
let base = await jimp.read(`../src/assets/beautiful.png`);
base.resize(376, 400);
let img = await jimp.read(image);
img.resize(84, 95);

View File

@@ -9,7 +9,7 @@ module.exports = class Bed {
async getImage(image1, image2) {
if (!image1) throw new Error(`You must provide an image as a first argument.`);
if (!image2) throw new Error(`You must provide an image as a second argument.`);
let bg = await jimp.read(`../src/module/assets/bed.png`);
let bg = await jimp.read(`../src/assets/bed.png`);
image1 = await jimp.read(image1);
image2 = await jimp.read(image2);
image1.circle();

View File

@@ -7,7 +7,7 @@ module.exports = class Delete {
*/
async getImage(image) {
if (!image) throw new Error(`You must provide an image.`);
let bg = await jimp.read(`../src/module/assets/delete.png`);
let bg = await jimp.read(`../src/assets/delete.png`);
image = await jimp.read(image);
image.resize(195, 195);
bg.composite(image, 120, 135);

View File

@@ -13,7 +13,7 @@ module.exports = class Facepalm {
ctx.fillRect(0, 0, 632, 357);
let avatar = await Canvas.loadImage(image);
ctx.drawImage(avatar, 199, 112, 235, 235);
let layer = await Canvas.loadImage(`../src/module/assets/facepalm.png`);
let layer = await Canvas.loadImage(`../src/assets/facepalm.png`);
ctx.drawImage(layer, 0, 0, 632, 357);
return canvas.toBuffer();
}

View File

@@ -7,7 +7,7 @@ module.exports = class Hitler {
*/
async getImage(image) {
if (!image) throw new Error(`You must provide an image.`);
let bg = await jimp.read(`../src/module/assets/hitler.png`);
let bg = await jimp.read(`../src/assets/hitler.png`);
let img = await jimp.read(image);
img.resize(140, 140);
bg.composite(img, 46, 43);

View File

@@ -7,7 +7,7 @@ module.exports = class Jail {
*/
async getImage(image) {
if (!image) throw new Error(`You must provide an image.`);
let bg = await Canvas.loadImage(`../src/module/assets/jail.png`);
let bg = await Canvas.loadImage(`../src/assets/jail.png`);
let img = await Canvas.loadImage(image);
const canvas = Canvas.createCanvas(400, 400);
const ctx = canvas.getContext(`2d`);

View File

@@ -9,7 +9,7 @@ module.exports = class Kiss {
async getImage(image1, image2) {
if (!image1) throw new Error(`You must provide an image as a first argument.`);
if (!image2) throw new Error(`You must provide an image as a second argument.`);
let base = await jimp.read(`../src/module/assets/kiss.png`);
let base = await jimp.read(`../src/assets/kiss.png`);
image1 = await jimp.read(image1);
image2 = await jimp.read(image2);
image1.circle();

View File

@@ -7,7 +7,7 @@ module.exports = class Mms {
*/
async getImage(image) {
if (!image) throw new Error(`You must provide an image.`);
let bg = await Canvas.loadImage(`../src/module/assets/mms.png`);
let bg = await Canvas.loadImage(`../src/assets/mms.png`);
let img = await Canvas.loadImage(image);
const canvas = Canvas.createCanvas(400, 400);
const ctx = canvas.getContext(`2d`);

View File

@@ -11,7 +11,7 @@ module.exports = class Rip {
if (!image) throw new Error(`You must provide an image.`);
const canvas = Canvas.createCanvas(244, 253);
const ctx = canvas.getContext(`2d`);
const background = await Canvas.loadImage(`../src/module/assets/rip.png`);
const background = await Canvas.loadImage(`../src/assets/rip.png`);
ctx.drawImage(background, 0, 0, canvas.width, canvas.height);
const avatar = await Canvas.loadImage(image);
ctx.drawImage(avatar, 63, 110, 90, 90);

View File

@@ -9,7 +9,7 @@ module.exports = class Spank {
async getImage(image1, image2) {
if (!image1) throw new Error(`You must provide an image as a first argument.`);
if (!image2) throw new Error(`You must provide an image as a second argument.`);
let bg = await jimp.read(`../src/module/assets/spank.png`);
let bg = await jimp.read(`../src/assets/spank.png`);
image1 = await jimp.read(image1);
image2 = await jimp.read(image2);
image1.circle();

View File

@@ -10,7 +10,7 @@ module.exports = class Tatoo {
const canvas = Canvas.createCanvas(750, 1089);
const ctx = canvas.getContext(`2d`);
const avatar = await Canvas.loadImage(image);
const background = await Canvas.loadImage(`../src/module/assets/tatoo.png`);
const background = await Canvas.loadImage(`../src/assets/tatoo.png`);
ctx.drawImage(avatar, 145, 575, 400, 400);
ctx.drawImage(background, 0, 0, 750, 1089);
return canvas.toBuffer();

View File

@@ -10,7 +10,7 @@ module.exports = class Thomas {
const canvas = Canvas.createCanvas(841, 1058);
const ctx = canvas.getContext(`2d`);
const avatar = await Canvas.loadImage(image);
const background = await Canvas.loadImage(`../src/module/assets/thomas.png`);
const background = await Canvas.loadImage(`../src/assets/thomas.png`);
ctx.drawImage(avatar, 220, 190, 400, 400);
ctx.drawImage(background, 0, 0, 841, 1058);
return canvas.toBuffer();

View File

@@ -7,7 +7,7 @@ module.exports = class Trash {
*/
async getImage(image) {
if (!image) throw new Error(`You must provide an image.`);
let bg = await jimp.read(`../src/module/assets/trash.png`);
let bg = await jimp.read(`../src/assets/trash.png`);
image = await jimp.read(image);
image.resize(309, 309);
image.blur(5);

View File

@@ -16,7 +16,7 @@ module.exports = class Wanted {
const canvas = Canvas.createCanvas(257, 383);
const ctx = canvas.getContext(`2d`);
const avatar = await Canvas.loadImage(image);
const background = await Canvas.loadImage(`../src/module/assets/wanted.png`);
const background = await Canvas.loadImage(`../src/assets/wanted.png`);
ctx.drawImage(avatar, 25, 60, 210, 210);
ctx.drawImage(background, 0, 0, 257, 383);
ctx.font = applyText(canvas, price.toLocaleString() + currency, 40, 200, "Times New Roman");