mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-05 13:53:12 +02:00
Beep
This commit is contained in:
@@ -41,11 +41,12 @@ module.exports = class HeLivesInYouCommand extends Command {
|
||||
const avatarCanvas = createCanvas(avatar.width, avatar.height);
|
||||
const avatarCtx = avatarCanvas.getContext('2d');
|
||||
distort(avatarCtx, 0, 0, avatar.width, avatar.height);
|
||||
const avatarDistort = await loadImage(avatarCanvas.toBuffer());
|
||||
const canvas = createCanvas(base.width, base.height);
|
||||
const ctx = canvas.getContext('2d');
|
||||
ctx.drawImage(base, 0, 0);
|
||||
ctx.rotate(-24 * (Math.PI / 180));
|
||||
drawImageWithTint(ctx, avatarCanvas, '#00115d', 75, 160, 130, 150);
|
||||
drawImageWithTint(ctx, avatarDistort, '#00115d', 75, 160, 130, 150);
|
||||
ctx.rotate(24 * (Math.PI / 180));
|
||||
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'he-lives-in-you.png' }] });
|
||||
} catch (err) {
|
||||
|
||||
Reference in New Issue
Block a user