mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Fix
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 1.3 MiB After Width: | Height: | Size: 480 KiB |
@@ -44,7 +44,7 @@ module.exports = class ThisGuyCommand extends Command {
|
|||||||
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.drawImage(base, 0, 0);
|
ctx.drawImage(base, 0, 0);
|
||||||
const { x, y, width, height } = centerImagePart(data, 722, 722, 152, 123);
|
const { x, y, width, height } = centerImagePart(data, 361, 361, 76, 62);
|
||||||
ctx.drawImage(data, x, y, width, height);
|
ctx.drawImage(data, x, y, width, height);
|
||||||
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'this-guy.png' }] });
|
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'this-guy.png' }] });
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|||||||
Reference in New Issue
Block a user