SOS Message can only be 4 chars

This commit is contained in:
Dragon Fire
2020-03-11 14:34:27 -04:00
parent 797a87281d
commit 73dc038e5a
+3 -4
View File
@@ -38,7 +38,7 @@ module.exports = class SosCommand extends Command {
key: 'message',
prompt: 'What should Esther spell out to signal for help?',
type: 'string',
max: 21
max: 4
}
]
});
@@ -50,13 +50,12 @@ module.exports = class SosCommand extends Command {
const canvas = createCanvas(base.width, base.height);
const ctx = canvas.getContext('2d');
ctx.drawImage(base, 0, 0);
ctx.font = '35px Noto';
ctx.font = '90px Noto';
ctx.fillStyle = 'black';
ctx.textAlign = 'center';
ctx.textBaseline = 'middle';
ctx.rotate(15 * (Math.PI / 180));
const lines = await wrapText(ctx, message, 130);
ctx.fillText(lines.join('\n'), 362, 522);
ctx.fillText(message, 362, 522);
ctx.rotate(-15 * (Math.PI / 180));
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'sos.png' }] });
} catch (err) {