mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-20 14:00:22 +02:00
Fix azur lane results
This commit is contained in:
@@ -27,6 +27,7 @@ module.exports = class AzurLaneShipCommand extends Command {
|
|||||||
const { body } = await request
|
const { body } = await request
|
||||||
.get(`https://al-shipgirls.pw/shipyard/ship_info_detailed/`)
|
.get(`https://al-shipgirls.pw/shipyard/ship_info_detailed/`)
|
||||||
.query({ search: query });
|
.query({ search: query });
|
||||||
|
if (!body.length) return msg.say('Could not find any results.');
|
||||||
const data = body[0].item;
|
const data = body[0].item;
|
||||||
const embed = new MessageEmbed()
|
const embed = new MessageEmbed()
|
||||||
.setColor(0x1A1917)
|
.setColor(0x1A1917)
|
||||||
@@ -58,7 +59,6 @@ module.exports = class AzurLaneShipCommand extends Command {
|
|||||||
`${data.images.map(img => `[${img.name}](${img.url})`).join(', ')}, [Chibi](${data.chibi})`);
|
`${data.images.map(img => `[${img.name}](${img.url})`).join(', ')}, [Chibi](${data.chibi})`);
|
||||||
return msg.embed(embed);
|
return msg.embed(embed);
|
||||||
} catch (err) {
|
} 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!`);
|
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "xiao",
|
"name": "xiao",
|
||||||
"version": "91.14.1",
|
"version": "91.14.2",
|
||||||
"description": "Your personal server companion.",
|
"description": "Your personal server companion.",
|
||||||
"main": "Xiao.js",
|
"main": "Xiao.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Reference in New Issue
Block a user