mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +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
|
||||
.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
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "xiao",
|
||||
"version": "91.14.1",
|
||||
"version": "91.14.2",
|
||||
"description": "Your personal server companion.",
|
||||
"main": "Xiao.js",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user