From 7b01151dded26ba1636159db5c5d406fe2d01f51 Mon Sep 17 00:00:00 2001 From: ION606 Date: Tue, 24 May 2022 09:10:12 +0300 Subject: [PATCH] Added a better catch statement for the 'scrape' command --- commands/misc/scraper.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/commands/misc/scraper.js b/commands/misc/scraper.js index fffc75d..e5b4e26 100644 --- a/commands/misc/scraper.js +++ b/commands/misc/scraper.js @@ -16,7 +16,11 @@ module.exports ={ message.channel.send(haste); // console.log(lyrics); }) - .catch(console.error); + .catch(function(err) { + if (err.message.indexOf('The "url" argument must be of type string.') != -1) { + message.reply("The URL should be a string!"); + } + }); } }