mirror of
https://github.com/warengroup/eximiabots-radiox.git
synced 2024-12-23 06:33:18 +00:00
Added logger to play.js
This commit is contained in:
parent
8168650f69
commit
f18776ce1a
@ -140,10 +140,10 @@ function play(interaction, guild, client, url) {
|
|||||||
radio.audioPlayer.play(resource);
|
radio.audioPlayer.play(resource);
|
||||||
resource.playStream
|
resource.playStream
|
||||||
.on("readable", () => {
|
.on("readable", () => {
|
||||||
console.log("[Radio] Stream started" + " / " + guild.id + " / " + radio.station.name);
|
client.funcs.logger('Radio', 'Stream started' + " / " + guild.id + " / " + radio.station.name);
|
||||||
})
|
})
|
||||||
.on("finish", () => {
|
.on("finish", () => {
|
||||||
console.log("[Radio] Stream finished" + " / " + guild.id);
|
client.funcs.logger('Radio', 'Stream finished' + " / " + guild.id);
|
||||||
client.funcs.statisticsUpdate(client, guild, radio);
|
client.funcs.statisticsUpdate(client, guild, radio);
|
||||||
radio.connection?.destroy();
|
radio.connection?.destroy();
|
||||||
radio.audioPlayer?.stop();
|
radio.audioPlayer?.stop();
|
||||||
@ -151,7 +151,7 @@ function play(interaction, guild, client, url) {
|
|||||||
return;
|
return;
|
||||||
})
|
})
|
||||||
.on("error", error => {
|
.on("error", error => {
|
||||||
console.log("[Radio] Stream errored");
|
client.funcs.logger('Radio', 'Stream errored');
|
||||||
console.error(error);
|
console.error(error);
|
||||||
radio.connection?.destroy();
|
radio.connection?.destroy();
|
||||||
radio.audioPlayer?.stop();
|
radio.audioPlayer?.stop();
|
||||||
|
Loading…
Reference in New Issue
Block a user