mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-17 00:07:36 +02:00
wrapText is no longer async
This commit is contained in:
@@ -45,7 +45,7 @@ module.exports = class ReactionMemeCommand extends Command {
|
||||
const canvas = createCanvas(base.width, base.height);
|
||||
const ctx = canvas.getContext('2d');
|
||||
ctx.font = this.client.fonts.get('Noto-Regular.ttf').toCanvasString(40);
|
||||
const lines = await wrapText(ctx, text, base.width - 10);
|
||||
const lines = wrapText(ctx, text, base.width - 10);
|
||||
const lineBreakLen = text.split('\n').length;
|
||||
const linesLen = (40 * lines.length)
|
||||
+ (40 * (lineBreakLen - 1))
|
||||
|
||||
Reference in New Issue
Block a user