This commit is contained in:
Dragon Fire
2020-06-14 23:55:15 -04:00
parent 4a4477496c
commit 36d4cd7f89
+1 -1
View File
@@ -44,9 +44,9 @@ module.exports = class YuGiOhTokenCommand extends Command {
const ctx = canvas.getContext('2d');
ctx.fillStyle = 'white';
ctx.fillRect(0, 0, base.width, base.height);
ctx.drawImage(base, 0, 0);
const height = 294 / data.width;
ctx.drawImage(data, 45, 102, 294, data.height * height);
ctx.drawImage(base, 0, 0);
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'yu-gi-oh-token.png' }] });
} catch (err) {
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);