mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-20 14:00:22 +02:00
Fix
This commit is contained in:
@@ -70,7 +70,7 @@ module.exports = class TweetCommand extends Command {
|
|||||||
const lines = wrapText(ctx, text, 710, true);
|
const lines = wrapText(ctx, text, 710, true);
|
||||||
const metrics = measureTextHeightWithBreaks(ctx, lines.join('\n'));
|
const metrics = measureTextHeightWithBreaks(ctx, lines.join('\n'));
|
||||||
const linesLen = metrics + 5;
|
const linesLen = metrics + 5;
|
||||||
canvas.height += linesLen;
|
canvas.height += linesLen - 1;
|
||||||
let imageHeight = 0;
|
let imageHeight = 0;
|
||||||
ctx.fillStyle = 'black';
|
ctx.fillStyle = 'black';
|
||||||
ctx.fillRect(0, base1.height, canvas.width, linesLen);
|
ctx.fillRect(0, base1.height, canvas.width, linesLen);
|
||||||
@@ -202,7 +202,6 @@ module.exports = class TweetCommand extends Command {
|
|||||||
ctx.clip();
|
ctx.clip();
|
||||||
}
|
}
|
||||||
ctx.drawImage(avatar, 17, 84, 52, 52);
|
ctx.drawImage(avatar, 17, 84, 52, 52);
|
||||||
canvas.height -= 1;
|
|
||||||
return msg.say({ files: [{ attachment: canvas.toBuffer('image/png'), name: 'tweet.png' }] });
|
return msg.say({ files: [{ attachment: canvas.toBuffer('image/png'), name: 'tweet.png' }] });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user