Added confusedstonk

main
Killian 4 years ago
parent b6ecb51206
commit 5671d1016e

@ -129,6 +129,10 @@ bot.login("super_secret_token")
![Bed](https://imgur.com/b1idSnr.png)
- ``new DIG.ConfusedStonk().getImage(`<Avatar>`);``
![ConfusedStonk](https://imgur.com/b4UB3BE.png)
- ``new DIG.Delete().getImage(`<Avatar>`);``
![Delete](https://imgur.com/6V1IYJp.png)

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 MiB

@ -0,0 +1,18 @@
const Canvas = require("canvas");
module.exports = class ConfusedStonk {
/**
* ConfusedStonk
* @param {image} image1
*/
async getImage(image1) {
if (!image1) throw new Error(`You must provide an image as argument.`);
const canvas = Canvas.createCanvas(1994, 1296);
const ctx = canvas.getContext(`2d`);
image1 = await Canvas.loadImage(image1);
const background = await Canvas.loadImage(`${__dirname}/../../assets/confusedStonk.png`);
ctx.drawImage(image1, 230, 75, 400, 400);
ctx.drawImage(background, 0, 0, 1994, 1296);
return canvas.toBuffer();
}
}
Loading…
Cancel
Save