canvas succ

This commit is contained in:
Daniel Odendahl Jr
2017-11-10 14:18:02 +00:00
parent 071100cdd5
commit ff2fdcea2f
@@ -23,7 +23,8 @@ module.exports = class DemotivationalPosterCommand extends Command {
{
key: 'title',
prompt: 'What should the title of the poster be?',
type: 'string'
type: 'string',
parse: title => title.toUpperCase()
},
{
key: 'text',
@@ -60,7 +61,7 @@ module.exports = class DemotivationalPosterCommand extends Command {
ctx.fillText(title, 375, 518);
ctx.font = '27px Noto';
ctx.fillStyle = 'white';
ctx.fillText(text, 375, 570);
ctx.fillText(text, 375, 565);
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'demotivational-poster.png' }] });
} catch (err) {
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);