Version 1.4.0
parent
afa32e0211
commit
10fcffd6b6
@ -0,0 +1,22 @@
|
||||
module.exports = {
|
||||
"rules": {
|
||||
"no-console": `off`,
|
||||
"indent": [`error`, 4],
|
||||
"semi": [`error`, `always`],
|
||||
"quotes": [`error`, `backtick`],
|
||||
"keyword-spacing": [
|
||||
`error`,
|
||||
{
|
||||
"before": true, "after": true
|
||||
}
|
||||
],
|
||||
},
|
||||
"extends": `eslint:recommended`,
|
||||
"env": {
|
||||
"es6": true,
|
||||
"node": true,
|
||||
},
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 2020
|
||||
},
|
||||
};
|
Binary file not shown.
After Width: | Height: | Size: 88 KiB |
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
@ -0,0 +1,18 @@
|
||||
const Canvas = require(`canvas`);
|
||||
|
||||
module.exports = class DiscordBlack {
|
||||
/**
|
||||
* Bobross
|
||||
* @param {image} image1
|
||||
*/
|
||||
async getImage(image1) {
|
||||
if (!image1) throw new Error(`You must provide an image as argument.`);
|
||||
const canvas = Canvas.createCanvas(610, 610);
|
||||
const ctx = canvas.getContext(`2d`);
|
||||
image1 = await Canvas.loadImage(image1);
|
||||
const background = await Canvas.loadImage(`${__dirname}/../../assets/discordblack.png`);
|
||||
ctx.drawImage(image1, 0, 0, 610, 610);
|
||||
ctx.drawImage(background, 0, 0, 610, 610);
|
||||
return canvas.toBuffer();
|
||||
}
|
||||
};
|
@ -0,0 +1,18 @@
|
||||
const Canvas = require(`canvas`);
|
||||
|
||||
module.exports = class DiscordBlue {
|
||||
/**
|
||||
* Bobross
|
||||
* @param {image} image1
|
||||
*/
|
||||
async getImage(image1) {
|
||||
if (!image1) throw new Error(`You must provide an image as argument.`);
|
||||
const canvas = Canvas.createCanvas(610, 610);
|
||||
const ctx = canvas.getContext(`2d`);
|
||||
image1 = await Canvas.loadImage(image1);
|
||||
const background = await Canvas.loadImage(`${__dirname}/../../assets/discordblue.png`);
|
||||
ctx.drawImage(image1, 0, 0, 610, 610);
|
||||
ctx.drawImage(background, 0, 0, 610, 610);
|
||||
return canvas.toBuffer();
|
||||
}
|
||||
};
|
Loading…
Reference in New Issue