mirror of
				https://github.com/warengroup/eximiabots-radiox.git
				synced 2025-10-31 20:41:35 +00:00 
			
		
		
		
	Update Streamer class
This commit is contained in:
		| @@ -6,11 +6,22 @@ const { | |||||||
| module.exports = class { | module.exports = class { | ||||||
|     constructor() { |     constructor() { | ||||||
|         this.map = new Map(); |         this.map = new Map(); | ||||||
|  |         this.mode = "auto"; | ||||||
|         this.stations = null; |         this.stations = null; | ||||||
|         this.logger = require("../funcs/logger.js"); |         this.logger = require("../funcs/logger.js"); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     init(client){ |     init(client){ | ||||||
|  |         if(!client.config.streamerMode) return; | ||||||
|  |  | ||||||
|  |         switch(client.config.streamerMode){ | ||||||
|  |             case "manual": | ||||||
|  |                 this.mode = "manual"; | ||||||
|  |             default: | ||||||
|  |                 this.mode = "auto"; | ||||||
|  |         } | ||||||
|  |  | ||||||
|  |         if(this.mode == "auto"){ | ||||||
|             if(!client.stations) return; |             if(!client.stations) return; | ||||||
|  |  | ||||||
|             client.stations.forEach(station => { |             client.stations.forEach(station => { | ||||||
| @@ -22,6 +33,7 @@ module.exports = class { | |||||||
|                 this.play(station); |                 this.play(station); | ||||||
|             }); |             }); | ||||||
|         } |         } | ||||||
|  |     } | ||||||
|  |  | ||||||
|     refresh(client){ |     refresh(client){ | ||||||
|         this.init(client); |         this.init(client); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Christer Warén
					Christer Warén