file is deprecated, make some changes in emoji

This commit is contained in:
Daniel Odendahl Jr
2017-04-20 00:36:37 +00:00
parent fef35440b2
commit 2df6c08de4
8 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -35,7 +35,7 @@ module.exports = class YearsCommand extends Command {
years.blit(avatar, 461, 127);
years.getBuffer(Jimp.MIME_PNG, (err, buff) => {
if (err) return message.say(':x: Error! Something went wrong!');
return message.channel.send({file: {attachment: buff}});
return message.channel.send({files: [{attachment: buff}]});
});
}
};
+1 -1
View File
@@ -37,7 +37,7 @@ module.exports = class BeautifulCommand extends Command {
beautiful.blit(avatar, 451, 434);
beautiful.getBuffer(Jimp.MIME_PNG, (err, buff) => {
if (err) return message.say(':x: Error! Something went wrong!');
return message.channel.send({file: {attachment: buff}});
return message.channel.send({files: [{attachment: buff}]});
});
}
};
+1 -1
View File
@@ -39,7 +39,7 @@ module.exports = class BobRossCommand extends Command {
nothing.composite(bob, 0, 0);
nothing.getBuffer(Jimp.MIME_PNG, (err, buff) => {
if (err) return message.say(':x: Error! Something went wrong!');
return message.channel.send({file: {attachment: buff}});
return message.channel.send({files: [{attachment: buff}]});
});
}
};
+1 -1
View File
@@ -36,7 +36,7 @@ module.exports = class RIPCommand extends Command {
gravestone.blit(avatar, 60, 65);
gravestone.getBuffer(Jimp.MIME_PNG, (err, buff) => {
if (err) return message.say(':x: Error! Something went wrong!');
return message.channel.send({file: {attachment: buff}});
return message.channel.send({files: [{attachment: buff}]});
});
}
};
+1 -1
View File
@@ -39,7 +39,7 @@ module.exports = class SteamCardCommand extends Command {
nothing.print(font, 38, 20, user.username);
nothing.getBuffer(Jimp.MIME_PNG, (err, buff) => {
if (err) return message.say(':x: Error! Something went wrong!');
return message.channel.send({file: {attachment: buff}});
return message.channel.send({files: [{attachment: buff}]});
});
}
};
+1 -1
View File
@@ -21,6 +21,6 @@ module.exports = class EmojiCommand extends Command {
if (message.channel.type !== 'dm') {
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
}
return message.say(message.guild.emojis.map(e => e).join(' '));
return message.say(message.guild.emojis.map(e => e).join('')).catch(() => message.say(':x: Error! Something went wrong!'));
}
};
+1 -1
View File
@@ -42,7 +42,7 @@ module.exports = class MapCommand extends Command {
try {
const { body } = await request
.get(`https://maps.googleapis.com/maps/api/staticmap?center=${location}&zoom=${zoom}&size=500x500&key=${process.env.GOOGLE_KEY}`);
return message.channel.send({file: {attachment: body}});
return message.channel.send({files: [{attachment: body}]});
} catch (err) {
return message.say(':x: Error! Something went wrong! Make sure you entered the location correctly!');
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "xiaobot",
"version": "30.0.1",
"version": "30.1.0",
"description": "A Discord Bot",
"main": "shardingmanager.js",
"scripts": {