mirror of
				https://github.com/warengroup/eximiabots-radiox.git
				synced 2025-11-04 00:29:33 +00:00 
			
		
		
		
	Added reload stations option in maintenance command
This commit is contained in:
		@@ -41,6 +41,12 @@ module.exports = {
 | 
			
		||||
                description: "",
 | 
			
		||||
                value: "6"
 | 
			
		||||
            },
 | 
			
		||||
            {
 | 
			
		||||
                emoji: "<:RadioXList:688541155519889482>",
 | 
			
		||||
                label: "Reload Stations",
 | 
			
		||||
                description: "",
 | 
			
		||||
                value: "7"
 | 
			
		||||
            },
 | 
			
		||||
            {
 | 
			
		||||
                emoji: "<:dnd:746069698139127831>",
 | 
			
		||||
                label: "Enable Maintenance Mode",
 | 
			
		||||
@@ -108,6 +114,18 @@ module.exports = {
 | 
			
		||||
                require(`../commands.js`).execute(client);
 | 
			
		||||
                client.user.setStatus('online');
 | 
			
		||||
                break;
 | 
			
		||||
            case "7":
 | 
			
		||||
                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');
 | 
			
		||||
                } catch (error) {
 | 
			
		||||
                    client.funcs.logger('Stations', 'Fetching list failed');
 | 
			
		||||
                }
 | 
			
		||||
                break;
 | 
			
		||||
            case "8":
 | 
			
		||||
                client.user.setStatus('dnd');
 | 
			
		||||
                break;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user