mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-24 10:25:11 +02:00
wrapText is no longer async
This commit is contained in:
@@ -58,7 +58,7 @@ module.exports = class SpongebobTimeCardCommand extends Command {
|
||||
ctx.textAlign = 'center';
|
||||
ctx.textBaseline = 'top';
|
||||
ctx.font = this.client.fonts.get('Spongeboytt1.ttf').toCanvasString(115);
|
||||
const lines = await wrapText(ctx, text.toUpperCase(), 1800);
|
||||
const lines = wrapText(ctx, text.toUpperCase(), 1800);
|
||||
const topMost = (canvas.height / 2) - (((115 * lines.length) / 2) + ((60 * (lines.length - 1)) / 2));
|
||||
for (let i = 0; i < lines.length; i++) {
|
||||
const height = topMost + ((115 + 60) * i);
|
||||
|
||||
Reference in New Issue
Block a user