mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-09 01:04:16 +02:00
Fix
This commit is contained in:
@@ -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}.
|
||||
|
||||
Reference in New Issue
Block a user