mirror of
				https://github.com/warengroup/eximiabots-radiox.git
				synced 2025-11-04 06:49:32 +00:00 
			
		
		
		
	Added logger to ready.js
This commit is contained in:
		@@ -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);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user