diff --git a/README.md b/README.md index bd0cc59..8b366cc 100644 --- a/README.md +++ b/README.md @@ -160,6 +160,10 @@ bot.login("super_secret_token") ![MMS](https://imgur.com/nH3URHb.png) +- ``new DIG.NotStonk().getImage(``);`` + +![NotStonk](https://imgur.com/NJ2Svtj.png) + - ``new DIG.Podium().getImage(`, , , , , `);`` ![Podium](https://imgur.com/bQoKf0a.png) diff --git a/src/module/montage/notStonk.js b/src/module/montage/notStonk.js new file mode 100644 index 0000000..a4dd9f0 --- /dev/null +++ b/src/module/montage/notStonk.js @@ -0,0 +1,18 @@ +const Canvas = require("canvas"); + +module.exports = class NotStonk { + /** + * NotStonk + * @param {image} image1 + */ + async getImage(image1) { + if (!image1) throw new Error(`You must provide an image as argument.`); + const canvas = Canvas.createCanvas(960, 576); + const ctx = canvas.getContext(`2d`); + image1 = await Canvas.loadImage(image1); + const background = await Canvas.loadImage(`${__dirname}/../../assets/notStonk.png`); + ctx.drawImage(image1, 140, 5, 190, 190); + ctx.drawImage(background, 0, 0, 960, 576); + return canvas.toBuffer(); + } +} \ No newline at end of file