diff --git a/README.md b/README.md index c7bc3cb..bd0cc59 100644 --- a/README.md +++ b/README.md @@ -176,6 +176,10 @@ bot.login("super_secret_token") ![Spank](https://imgur.com/VRvogo7.png) +- ``new DIG.Stonk().getImage(``);`` + +![Stonk](https://imgur.com/oAVgevR.png) + - ``new DIG.Tatoo().getImage(``)`` ![Tatoo](https://imgur.com/wJju4UJ.png) diff --git a/src/assets/doubleStonk.png b/src/assets/doubleStonk.png new file mode 100644 index 0000000..05389ed Binary files /dev/null and b/src/assets/doubleStonk.png differ diff --git a/src/assets/notStonk.png b/src/assets/notStonk.png new file mode 100644 index 0000000..bc666b5 Binary files /dev/null and b/src/assets/notStonk.png differ diff --git a/src/assets/stonk.png b/src/assets/stonk.png new file mode 100644 index 0000000..a1c80df Binary files /dev/null and b/src/assets/stonk.png differ diff --git a/src/module/montage/stonk.js b/src/module/montage/stonk.js new file mode 100644 index 0000000..6fc36c5 --- /dev/null +++ b/src/module/montage/stonk.js @@ -0,0 +1,18 @@ +const Canvas = require("canvas"); + +module.exports = class Stonk { + /** + * Stonk + * @param {image} image1 + */ + async getImage(image1) { + if (!image1) throw new Error(`You must provide an image as argument.`); + const canvas = Canvas.createCanvas(900, 539); + const ctx = canvas.getContext(`2d`); + image1 = await Canvas.loadImage(image1); + const background = await Canvas.loadImage(`${__dirname}/../../assets/stonk.png`); + ctx.drawImage(image1, 70, 40, 240, 240); + ctx.drawImage(background, 0, 0, 900, 539); + return canvas.toBuffer(); + } +} \ No newline at end of file