diff --git a/README.md b/README.md index ac9e178..ee962ea 100644 --- a/README.md +++ b/README.md @@ -129,6 +129,10 @@ bot.login("super_secret_token") ![Bed](https://imgur.com/b1idSnr.png) +- ``new DIG.ConfusedStonk().getImage(``);`` + +![ConfusedStonk](https://imgur.com/b4UB3BE.png) + - ``new DIG.Delete().getImage(``);`` ![Delete](https://imgur.com/6V1IYJp.png) diff --git a/src/assets/confusedStonk.png b/src/assets/confusedStonk.png new file mode 100644 index 0000000..4444f3f Binary files /dev/null and b/src/assets/confusedStonk.png differ diff --git a/src/module/montage/confusedStonk.js b/src/module/montage/confusedStonk.js new file mode 100644 index 0000000..d84740b --- /dev/null +++ b/src/module/montage/confusedStonk.js @@ -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(); + } +} \ No newline at end of file