mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-17 08:17:35 +02:00
wrapText is no longer async
This commit is contained in:
@@ -48,7 +48,7 @@ module.exports = class JeopardyQuestionCommand extends Command {
|
||||
ctx.textBaseline = 'top';
|
||||
ctx.fillStyle = 'white';
|
||||
ctx.font = this.client.fonts.get('OPTIKorinna-Agency.otf').toCanvasString(62);
|
||||
const lines = await wrapText(ctx, text.toUpperCase(), 813);
|
||||
const lines = wrapText(ctx, text.toUpperCase(), 813);
|
||||
const topMost = (canvas.height / 2) - (((52 * lines.length) / 2) + ((20 * (lines.length - 1)) / 2));
|
||||
for (let i = 0; i < lines.length; i++) {
|
||||
const height = topMost + ((52 + 20) * i);
|
||||
|
||||
Reference in New Issue
Block a user