From 9dbd494a205e440f8410a567dc2bb64c370e9c95 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Wed, 27 May 2020 09:33:32 -0400 Subject: [PATCH] More natural like/retweet/reply count in tweet --- commands/edit-image/tweet.js | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/commands/edit-image/tweet.js b/commands/edit-image/tweet.js index 6c6e7f2f..93b80545 100644 --- a/commands/edit-image/tweet.js +++ b/commands/edit-image/tweet.js @@ -68,11 +68,11 @@ module.exports = class TweetCommand extends Command { const ctx = canvas.getContext('2d'); ctx.font = '23px Noto'; const lines = await wrapText(ctx, text, 710); - const linesLen = (23 * lines.length) + (8 * (lines.length - 1)); + const linesLen = (23 * lines.length) + (9 * (lines.length - 1)); canvas.height += linesLen; - const likes = Math.floor(Math.random() * 999999) + 1; - const retweets = Math.floor(Math.random() * 999999) + 1; - const replies = Math.floor(Math.random() * 999999) + 1; + const likes = Math.floor(Math.random() * 100000) + 1; + const retweets = Math.floor(Math.random() * 100000) + 1; + const replies = Math.floor(Math.random() * 100000) + 1; ctx.fillStyle = '#15202b'; ctx.fillRect(0, base1.height, canvas.width, linesLen); ctx.drawImage(base1, 0, 0); diff --git a/package.json b/package.json index 455a3d9d..192c86be 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiao", - "version": "114.30.3", + "version": "114.30.4", "description": "Your personal server companion.", "main": "Xiao.js", "scripts": {