GraveStone

This commit is contained in:
Daniel Odendahl Jr
2017-04-23 01:57:41 +00:00
parent a9785596e9
commit 87d7893904
4 changed files with 3 additions and 2 deletions
+2 -2
View File
@@ -30,10 +30,10 @@ module.exports = class RIPCommand extends Command {
const userAvatar = user.displayAvatarURL.replace('.jpg', '.png').replace('.gif', '.png');
let images = [];
images.push(Jimp.read(userAvatar));
images.push(Jimp.read('./images/gravestone.jpg'));
images.push(Jimp.read('./images/gravestone.png'));
const [avatar, gravestone] = await Promise.all(images);
avatar.resize(200, 200);
gravestone.blit(avatar, 60, 65);
gravestone.blit(avatar, 158, 51);
gravestone.getBuffer(Jimp.MIME_PNG, (err, buff) => {
if (err) return message.say(':x: Error! Something went wrong!');
return message.channel.send({files: [{attachment: buff}]});
Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 KiB

+1
View File
@@ -28,6 +28,7 @@
"node": "7.9.0"
},
"dependencies": {
"canvas": "^1.6.5",
"cheerio": "^0.22.0",
"custom-translate": "dragonfire535/custom-translate",
"discord.js": "hydrabolt/discord.js",