mirror of
https://github.com/warengroup/eximiabots-radiox.git
synced 2025-07-01 08:23:37 +00:00
Added calculateGlobal function to datastore and if playlist doesnt exist then bot's status is dnd.
This commit is contained in:
@ -23,7 +23,6 @@ module.exports = {
|
||||
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);
|
||||
}
|
||||
|
||||
@ -32,6 +31,12 @@ module.exports = {
|
||||
.then(res => res.json());
|
||||
}, 3600000);
|
||||
|
||||
if(!client.stations) {
|
||||
client.user.setStatus('dnd');
|
||||
}
|
||||
|
||||
client.datastore.calculateGlobal(client);
|
||||
require(`../emojis.js`).execute(client);
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user