From 42fd8f14fab465799d386507964f20024a675e79 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Wed, 1 Aug 2018 21:29:32 -0400 Subject: [PATCH] This returns a 404 on invalid now --- commands/search/derpibooru.js | 1 + package.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/commands/search/derpibooru.js b/commands/search/derpibooru.js index 45e79543..24396abd 100644 --- a/commands/search/derpibooru.js +++ b/commands/search/derpibooru.js @@ -31,6 +31,7 @@ module.exports = class DerpibooruCommand extends Command { const { body } = await request.get(`https://derpibooru.org/images/${search.body.id}.json`); return msg.say(`https:${body.representations.full}`); } 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!`); } } diff --git a/package.json b/package.json index 0ef2410a..1937238a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiao", - "version": "85.10.0", + "version": "85.10.1", "description": "Your personal server companion.", "main": "Xiao.js", "scripts": {