This commit is contained in:
Dragon Fire
2024-04-28 15:41:12 -04:00
parent 77da9dbd70
commit f3e3e58a2b
+3 -3
View File
@@ -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);