mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Fix
This commit is contained in:
@@ -85,8 +85,8 @@ module.exports = class TweetCommand extends Command {
|
||||
imageHeight = imageData.height * imageHeightRatio;
|
||||
const imageCanvas = createCanvas(imageWidth, imageHeight);
|
||||
const imageCtx = imageCanvas.getContext('2d');
|
||||
canvas.height += imageHeight + 30;
|
||||
ctx.fillRect(0, base1.height, canvas.width, linesLen + imageHeight + 30);
|
||||
canvas.height += imageHeight + 15;
|
||||
ctx.fillRect(0, base1.height, canvas.width, linesLen + imageHeight + 15);
|
||||
const x = 0;
|
||||
const y = 0;
|
||||
const radius = 15;
|
||||
@@ -106,7 +106,7 @@ module.exports = class TweetCommand extends Command {
|
||||
const bookmarks = randomRange(Math.ceil(userData.followers * 0.000015), Math.ceil(userData.followers * 0.00002));
|
||||
const views = randomRange(Math.ceil(userData.followers * 10), Math.ceil(userData.followers * 30));
|
||||
ctx.drawImage(base1, 0, 0);
|
||||
const base2StartY = base1.height + linesLen + (image ? imageHeight + 30 : 0);
|
||||
const base2StartY = base1.height + linesLen + (image ? imageHeight + 15 : 0);
|
||||
ctx.drawImage(base2, 0, base2StartY);
|
||||
ctx.textBaseline = 'top';
|
||||
ctx.font = this.client.fonts.get('ChirpBold.ttf').toCanvasString(18);
|
||||
|
||||
Reference in New Issue
Block a user