From 2df6c08de44496fc24cb3d3a040a85fd46022119 Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Thu, 20 Apr 2017 00:36:37 +0000 Subject: [PATCH] file is deprecated, make some changes in emoji --- commands/avataredit/3000years.js | 2 +- commands/avataredit/beautiful.js | 2 +- commands/avataredit/bobross.js | 2 +- commands/avataredit/rip.js | 2 +- commands/avataredit/steamcard.js | 2 +- commands/guildinfo/emoji.js | 2 +- commands/search/map.js | 2 +- package.json | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/commands/avataredit/3000years.js b/commands/avataredit/3000years.js index 228203b7..54cdff05 100644 --- a/commands/avataredit/3000years.js +++ b/commands/avataredit/3000years.js @@ -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}]}); }); } }; diff --git a/commands/avataredit/beautiful.js b/commands/avataredit/beautiful.js index 2c62d12b..b7bfc48f 100644 --- a/commands/avataredit/beautiful.js +++ b/commands/avataredit/beautiful.js @@ -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}]}); }); } }; diff --git a/commands/avataredit/bobross.js b/commands/avataredit/bobross.js index 8c6fe086..8735c561 100644 --- a/commands/avataredit/bobross.js +++ b/commands/avataredit/bobross.js @@ -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}]}); }); } }; diff --git a/commands/avataredit/rip.js b/commands/avataredit/rip.js index 89f88382..9a9af2be 100644 --- a/commands/avataredit/rip.js +++ b/commands/avataredit/rip.js @@ -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}]}); }); } }; diff --git a/commands/avataredit/steamcard.js b/commands/avataredit/steamcard.js index 7347eb08..67cc1274 100644 --- a/commands/avataredit/steamcard.js +++ b/commands/avataredit/steamcard.js @@ -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}]}); }); } }; diff --git a/commands/guildinfo/emoji.js b/commands/guildinfo/emoji.js index 2fe3368d..3096d186 100644 --- a/commands/guildinfo/emoji.js +++ b/commands/guildinfo/emoji.js @@ -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!')); } }; diff --git a/commands/search/map.js b/commands/search/map.js index 5d46a933..7dc6032a 100644 --- a/commands/search/map.js +++ b/commands/search/map.js @@ -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!'); } diff --git a/package.json b/package.json index c177db7d..ae4a7b5b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiaobot", - "version": "30.0.1", + "version": "30.1.0", "description": "A Discord Bot", "main": "shardingmanager.js", "scripts": {