This commit is contained in:
Daniel Odendahl Jr
2017-04-03 21:18:17 +00:00
parent 486e6afc70
commit 4f0f1b4ad2
+1 -5
View File
@@ -25,7 +25,6 @@ module.exports = class YearsCommand extends commando.Command {
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES', 'ATTACH_FILES'])) return;
}
console.log(`[Command] ${message.content}`);
message.channel.startTyping();
let user = args.user;
let userAvatar = user.displayAvatarURL;
userAvatar = userAvatar.replace(".jpg", ".png");
@@ -38,10 +37,7 @@ module.exports = class YearsCommand extends commando.Command {
years.blit(avatar, 461, 127);
years.getBuffer(Jimp.MIME_PNG, (err, buff) => {
if (err) return message.say(':x: Error! Something went wrong!');
message.channel.sendFile(buff).then(snd => {
message.channel.stopTyping();
return;
});
return message.channel.sendFile(buff);
});
}
};