Fix hopefully

This commit is contained in:
Dragon Fire
2020-05-31 12:30:09 -04:00
parent 1ee5da8c65
commit bece16f90e
2 changed files with 6 additions and 6 deletions
+2 -1
View File
@@ -68,7 +68,8 @@ 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) + (23 * (text.split('\n').length - 1)) + (9 * (lines.length - 1));
const lineBreakLen = text.split('\n').length;
const linesLen = (23 * lines.length) + (23 * (lineBreakLen - 1)) + (9 * lines.length) + (9 * (lineBreakLen - 1));
canvas.height += linesLen;
const likes = Math.floor(Math.random() * 100000) + 1;
const retweets = Math.floor(Math.random() * 100000) + 1;