mirror of
https://github.com/warengroup/eximiabots-radiox.git
synced 2024-12-23 01:13:17 +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);
|
||||
resource.playStream
|
||||
.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", () => {
|
||||
console.log("[Radio] Stream finished" + " / " + guild.id);
|
||||
client.funcs.logger('Radio', 'Stream finished' + " / " + guild.id);
|
||||
client.funcs.statisticsUpdate(client, guild, radio);
|
||||
radio.connection?.destroy();
|
||||
radio.audioPlayer?.stop();
|
||||
@ -151,7 +151,7 @@ function play(interaction, guild, client, url) {
|
||||
return;
|
||||
})
|
||||
.on("error", error => {
|
||||
console.log("[Radio] Stream errored");
|
||||
client.funcs.logger('Radio', 'Stream errored');
|
||||
console.error(error);
|
||||
radio.connection?.destroy();
|
||||
radio.audioPlayer?.stop();
|
||||
|
Loading…
Reference in New Issue
Block a user