From a79ac8e5a598c22b569869079d77de09054be48c Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Mon, 19 Feb 2018 22:36:23 +0000 Subject: [PATCH] Fix --- commands/image-edit/osu-signature.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/commands/image-edit/osu-signature.js b/commands/image-edit/osu-signature.js index 4d385ea9..53b56af5 100644 --- a/commands/image-edit/osu-signature.js +++ b/commands/image-edit/osu-signature.js @@ -35,7 +35,7 @@ module.exports = class OsuSignatureCommand extends Command { async run(msg, { user, color }) { try { - const { body } = await snekfetch + const { body, text } = await snekfetch .get('https://lemmmy.pw/osusig/sig.php') .query({ colour: color, @@ -48,6 +48,7 @@ module.exports = class OsuSignatureCommand extends Command { onlineindicator: '', xpbar: '' }); + if (text.startsWith('
\nWarning')) return msg.say('Could not find any results.'); return msg.say({ files: [{ attachment: body, name: 'osu-signature.png' }] }); } catch (err) { return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);