Attempt to fix weather command crashing when website is down
This commit is contained in:
parent
5c80c5cd05
commit
2c8be96c1b
1 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||
});
|
||||
|
||||
})
|
||||
|
|
Loading…
Add table
Reference in a new issue