Fix azur lane results

This commit is contained in:
Dragon Fire
2018-09-29 20:52:13 -04:00
parent e81b54e1cd
commit 2b217321da
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -27,6 +27,7 @@ module.exports = class AzurLaneShipCommand extends Command {
const { body } = await request
.get(`https://al-shipgirls.pw/shipyard/ship_info_detailed/`)
.query({ search: query });
if (!body.length) return msg.say('Could not find any results.');
const data = body[0].item;
const embed = new MessageEmbed()
.setColor(0x1A1917)
@@ -58,7 +59,6 @@ module.exports = class AzurLaneShipCommand extends Command {
`${data.images.map(img => `[${img.name}](${img.url})`).join(', ')}, [Chibi](${data.chibi})`);
return msg.embed(embed);
} catch (err) {
if (err.status === 404) return msg.say('Could not find any results.');
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "xiao",
"version": "91.14.1",
"version": "91.14.2",
"description": "Your personal server companion.",
"main": "Xiao.js",
"scripts": {