Update ready.js

This commit is contained in:
MatteZ02 2020-03-11 22:46:42 +02:00
parent 156fb13739
commit 438c77eacb

View File

@ -18,8 +18,13 @@ module.exports = {
}
}
client.stations = await fetch('https://gitea.cwinfo.org/cwchristerw/radio/raw/branch/master/playlist.json')
.then(res => res.json());
try {
client.stations = await fetch('https://gitea.cwinfo.org/cwchristerw/radio/raw/branch/master/playlist.json')
.then(res => res.json());
} catch (err) {
client.stations = null;
console.error(err);
}
setInterval(async () => {
client.stations = await fetch('https://gitea.cwinfo.org/cwchristerw/radio/raw/branch/master/playlist.json')