mirror of
				https://github.com/warengroup/eximiabots-radiox.git
				synced 2025-11-04 14:09:33 +00:00 
			
		
		
		
	Create event listeners once in Streamer class
This commit is contained in:
		@@ -64,13 +64,6 @@ export default class Streamer {
 | 
			
		||||
                });
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            this.map.set(station.name, audioPlayer);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        const url = station.stream[station.stream.default];
 | 
			
		||||
        const resource = createAudioResource(url);
 | 
			
		||||
        audioPlayer.play(resource);
 | 
			
		||||
 | 
			
		||||
            audioPlayer
 | 
			
		||||
                .on(AudioPlayerStatus.Playing, () => {
 | 
			
		||||
                    logger('Streamer', station.name + " / " + "Playing");
 | 
			
		||||
@@ -87,6 +80,14 @@ export default class Streamer {
 | 
			
		||||
                .on(AudioPlayerStatus.AutoPaused, () => {
 | 
			
		||||
                    logger('Streamer', station.name + " / " + "AutoPaused");
 | 
			
		||||
                })
 | 
			
		||||
 | 
			
		||||
            this.map.set(station.name, audioPlayer);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        const url = station.stream[station.stream.default];
 | 
			
		||||
        const resource = createAudioResource(url);
 | 
			
		||||
        audioPlayer.play(resource);
 | 
			
		||||
 | 
			
		||||
        return audioPlayer;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user