mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-18 13:56:25 +02:00
Fix
This commit is contained in:
@@ -39,8 +39,6 @@ module.exports = class YearsCommand extends Command {
|
|||||||
const avatar = await loadImage(body);
|
const avatar = await loadImage(body);
|
||||||
const canvas = createCanvas(base.width, base.height);
|
const canvas = createCanvas(base.width, base.height);
|
||||||
const ctx = canvas.getContext('2d');
|
const ctx = canvas.getContext('2d');
|
||||||
ctx.fillStyle = 'white';
|
|
||||||
ctx.fillRect(0, 0, base.width, base.height);
|
|
||||||
ctx.drawImage(base, 0, 0);
|
ctx.drawImage(base, 0, 0);
|
||||||
ctx.drawImage(avatar, 461, 127, 200, 200);
|
ctx.drawImage(avatar, 461, 127, 200, 200);
|
||||||
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: '3000-years.png' }] });
|
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: '3000-years.png' }] });
|
||||||
|
|||||||
@@ -39,6 +39,8 @@ module.exports = class BeautifulCommand extends Command {
|
|||||||
const avatar = await loadImage(body);
|
const avatar = await loadImage(body);
|
||||||
const canvas = createCanvas(base.width, base.height);
|
const canvas = createCanvas(base.width, base.height);
|
||||||
const ctx = canvas.getContext('2d');
|
const ctx = canvas.getContext('2d');
|
||||||
|
ctx.fillStyle = 'white';
|
||||||
|
ctx.fillRect(0, 0, base.width, base.height);
|
||||||
ctx.drawImage(base, 0, 0);
|
ctx.drawImage(base, 0, 0);
|
||||||
ctx.drawImage(avatar, 341, 35, 117, 135);
|
ctx.drawImage(avatar, 341, 35, 117, 135);
|
||||||
ctx.drawImage(avatar, 343, 301, 117, 135);
|
ctx.drawImage(avatar, 343, 301, 117, 135);
|
||||||
|
|||||||
Reference in New Issue
Block a user