Attempt to fix weather command crashing when website is down

This commit is contained in:
SileNce5k 2023-12-07 12:23:26 +01:00
parent 5c80c5cd05
commit 2c8be96c1b
No known key found for this signature in database
GPG key ID: 961132EB78C8915F

View file

@ -32,7 +32,9 @@ module.exports = async function (location) {
}).on("error", (err) => {
reject(err);
}).on('timeout', (err) => {
reject(err)
resolve(`Timed out while getting weather for ${location}. Weather service might be down\nCheck console for more info`);
console.log(err);
success = false;
});
})