From 5f8f842bbc81a240aee2d2aba7a13dc90efc4490 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Thu, 20 Aug 2020 00:13:34 -0400 Subject: [PATCH] 400 response = no faces --- commands/analyze/face.js | 1 + 1 file changed, 1 insertion(+) diff --git a/commands/analyze/face.js b/commands/analyze/face.js index 8dd4863a..6a621468 100644 --- a/commands/analyze/face.js +++ b/commands/analyze/face.js @@ -52,6 +52,7 @@ module.exports = class FaceCommand extends Command { ${beautyScore > 50 ? beautyScore > 70 ? beautyScore > 90 ? 'Hot!' : 'Not bad.' : 'Not _too_ ugly.' : 'Uggggly!'} `); } catch (err) { + if (err.status === 400) return msg.reply('There are no faces in this image.'); if (err.status === 403) return msg.reply('Hold your horses! The command is overloaded! Try again soon.'); return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); }