Added example for .tatoo()

Fixed the litle hole at the top of the users pic on .thomas()
main
Killian' Dal-Cin 5 years ago
parent c4d2c3f744
commit ec7379c854

@ -33,6 +33,10 @@ You can also join me on my <a href="https://discord.gg/qvzwqaM">discord server.<
## v1.1.12 ## v1.1.12
- Saved all examples to imgur - Saved all examples to imgur
## v1.1.13
- Added example for .tatoo()
- Fixed the litle hole at the top of the users pic on .thomas()
# Download # Download
@ -178,4 +182,8 @@ bot.login("super_secret_token")
- .thomas(`<Avatar>`); - .thomas(`<Avatar>`);
![Thomas](https://imgur.com/5Iv6t9v.png) ![Thomas](https://imgur.com/5Iv6t9v.png)
- .tatoo(`<Avatar>`)
![Tatoo](https://imgur.com/wJju4UJ.png)

@ -1,6 +1,6 @@
{ {
"name": "discord-image-generation", "name": "discord-image-generation",
"version": "0.1.12", "version": "0.1.13",
"description": "discord-image-generation is a powerfull module that allow you to generate awesome images.", "description": "discord-image-generation is a powerfull module that allow you to generate awesome images.",
"main": "src/index.js", "main": "src/index.js",
"scripts": { "scripts": {

@ -432,13 +432,13 @@ class DIG {
const ctx = canvas.getContext("2d"); const ctx = canvas.getContext("2d");
const avatar = await Canvas.loadImage(image); const avatar = await Canvas.loadImage(image);
const background = await Canvas.loadImage(__dirname +"/assets/thomas.png"); const background = await Canvas.loadImage(__dirname +"/assets/thomas.png");
ctx.drawImage(avatar, 220, 200, 400, 400); ctx.drawImage(avatar, 220, 190, 400, 400);
ctx.drawImage(background, 0, 0, 841, 1058); ctx.drawImage(background, 0, 0, 841, 1058);
return canvas.toBuffer(); return canvas.toBuffer();
} }
/** /**
* Thomas * Tatoo
* @param {image} image * @param {image} image
*/ */
static async tatoo(image) { static async tatoo(image) {

Loading…
Cancel
Save