mirror of
https://github.com/warengroup/eximiabots-radiox.git
synced 2024-11-10 02:20:18 +00:00
Added logger to ready.js
This commit is contained in:
parent
b979d26425
commit
c5f269c0a7
@ -21,19 +21,25 @@ module.exports = {
|
||||
}
|
||||
|
||||
try {
|
||||
client.funcs.logger('Stations', 'Started fetching list – ' + client.config.stationslistUrl);
|
||||
client.stations = await fetch(client.config.stationslistUrl)
|
||||
.then(client.funcs.checkFetchStatus)
|
||||
.then(response => response.json());
|
||||
client.funcs.logger('Stations', 'Successfully fetched list' + "\n");
|
||||
} catch (error) {
|
||||
//console.error(error);
|
||||
client.funcs.logger('Stations', ' Fetching list failed');
|
||||
console.error(error + "\n");
|
||||
}
|
||||
|
||||
setInterval(async () => {
|
||||
try {
|
||||
client.funcs.logger('Stations' + 'Started fetching list – ' + client.config.stationslistUrl);
|
||||
client.stations = await fetch(client.config.stationslistUrl)
|
||||
.then(client.funcs.checkFetchStatus)
|
||||
.then(response => response.json());
|
||||
console.log('Stations', 'Successfully fetched list' + "\n");
|
||||
} catch (error) {
|
||||
client.funcs.logger('Stations', 'Fetching list failed');
|
||||
//console.error(error);
|
||||
}
|
||||
}, 3600000);
|
||||
|
Loading…
Reference in New Issue
Block a user