Fix transparent avatars

This commit is contained in:
Daniel Odendahl Jr
2017-11-10 14:37:31 +00:00
parent ff2fdcea2f
commit aa31cefaba
7 changed files with 7 additions and 1 deletions
+2
View File
@@ -39,6 +39,8 @@ module.exports = class YearsCommand extends Command {
const avatar = await loadImage(body);
const canvas = createCanvas(base.width, base.height);
const ctx = canvas.getContext('2d');
ctx.fillStyle = 'white';
ctx.fillRect(0, 0, base.width, base.height);
ctx.drawImage(base, 0, 0);
ctx.drawImage(avatar, 461, 127, 200, 200);
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: '3000-years.png' }] });