mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-25 14:21:41 +02:00
Fix
This commit is contained in:
@@ -65,8 +65,8 @@ module.exports = class NikeAdCommand extends Command {
|
|||||||
const lines = wrapText(ctx, `Believe in ${something}. Even if it means ${sacrifice}.`, data.width);
|
const lines = wrapText(ctx, `Believe in ${something}. Even if it means ${sacrifice}.`, data.width);
|
||||||
const initial = data.height / 2;
|
const initial = data.height / 2;
|
||||||
for (let i = 0; i < lines.length; i++) {
|
for (let i = 0; i < lines.length; i++) {
|
||||||
const height = initial + (i * fontSize) + (i * 10);
|
const textHeight = initial + (i * fontSize) + (i * 10);
|
||||||
ctx.fillText(lines[i], data.width / 2, height);
|
ctx.fillText(lines[i], data.width / 2, textHeight);
|
||||||
}
|
}
|
||||||
const attachment = canvas.toBuffer();
|
const attachment = canvas.toBuffer();
|
||||||
if (Buffer.byteLength(attachment) > 8e+6) return msg.reply('Resulting image was above 8 MB.');
|
if (Buffer.byteLength(attachment) > 8e+6) return msg.reply('Resulting image was above 8 MB.');
|
||||||
|
|||||||
Reference in New Issue
Block a user