From e5aad749f5be27ce7d515a2474b7b819a75516ac Mon Sep 17 00:00:00 2001 From: FLGX Date: Thu, 19 Mar 2020 10:46:53 +0100 Subject: [PATCH] make weather command return if an error occured --- src/commands/weather.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/weather.js b/src/commands/weather.js index f5fc362..4af8b86 100644 --- a/src/commands/weather.js +++ b/src/commands/weather.js @@ -13,7 +13,7 @@ exports.run = async (client, message, args, error) => { message.channel.startTyping(); weather.find({search: args.join(" "), degreeType: 'C'}, function(err, result) { - if(err) client.logger.log(`weather.js error: ${JSON.stringify(error)}`, "error") + if(err) return client.logger.log(`weather.js error: ${JSON.stringify(error)}`, "error") if(result.length < 2 || !result) { message.channel.stopTyping(); return message.channel.send("<:error:466995152976871434> City not found!");