This commit is contained in:
Dragon Fire
2020-01-20 11:14:12 -05:00
parent 8bb9f8daad
commit 5422f74f96
+2 -2
View File
@@ -4,7 +4,7 @@ const { stripIndents } = require('common-tags');
const path = require('path');
const { wrapText } = require('../../util/Canvas');
const texts = require('../../assets/json/be-like-bill');
registerFont(path.join(__dirname, '..', '..', 'assets', 'fonts', 'arialbd.ttf'), { family: 'Arial', style: 'Bold' });
registerFont(path.join(__dirname, '..', '..', 'assets', 'fonts', 'arialbd.ttf'), { family: 'Arial', weight: 'bold' });
module.exports = class BeLikeBillCommand extends Command {
constructor(client) {
@@ -50,7 +50,7 @@ module.exports = class BeLikeBillCommand extends Command {
const canvas = createCanvas(base.width, base.height);
const ctx = canvas.getContext('2d');
ctx.drawImage(base, 0, 0);
ctx.font = '23px Arial Bold';
ctx.font = 'normal bold 23px Arial';
const text = await wrapText(ctx, texts[Math.floor(Math.random() * texts.length)].replace(/{{name}}/gi, name), 569);
ctx.fillText(stripIndents`
This is ${name}.