Update Streamer class

This commit is contained in:
Christer Warén 2021-09-11 17:34:50 +03:00
parent b66a60ebe9
commit 0bc26f8895

View File

@ -16,12 +16,12 @@ module.exports = class {
if(!client.stations) return;
client.stations.forEach(station => {
const url = station.stream[station.stream.default];
this.play(station);
});
}
play(station) {
const url = station.stream[station.stream.default];
const audioPlayer = createAudioPlayer();
const resource = createAudioResource(url);
audioPlayer.play(resource);