mirror of
https://github.com/warengroup/eximiabots-radiox.git
synced 2024-12-22 22:43:17 +00:00
Removed radio.voiceChannel.leave() and replaced with radio.connection.destroy()
This commit is contained in:
parent
0515f0f5e3
commit
f543cd3267
@ -135,13 +135,13 @@ function play(guild, client, url) {
|
|||||||
.on("finish", () => {
|
.on("finish", () => {
|
||||||
console.log("Stream finished");
|
console.log("Stream finished");
|
||||||
client.funcs.statisticsUpdate(client, guild, radio);
|
client.funcs.statisticsUpdate(client, guild, radio);
|
||||||
radio.voiceChannel.leave();
|
radio.connection.destroy();
|
||||||
client.radio.delete(guild.id);
|
client.radio.delete(guild.id);
|
||||||
return;
|
return;
|
||||||
})
|
})
|
||||||
.on("error", error => {
|
.on("error", error => {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
radio.voiceChannel.leave();
|
radio.connection.destroy();
|
||||||
client.radio.delete(guild.id);
|
client.radio.delete(guild.id);
|
||||||
return radio.textChannel.send(client.messages.errorPlaying);
|
return radio.textChannel.send(client.messages.errorPlaying);
|
||||||
});
|
});
|
||||||
|
@ -10,7 +10,6 @@ module.exports = {
|
|||||||
if (client.funcs.check(client, msg, command)) {
|
if (client.funcs.check(client, msg, command)) {
|
||||||
client.funcs.statisticsUpdate(client, msg.guild, radio);
|
client.funcs.statisticsUpdate(client, msg.guild, radio);
|
||||||
radio.connection.destroy();
|
radio.connection.destroy();
|
||||||
radio.voiceChannel.leave();
|
|
||||||
client.radio.delete(msg.guild.id);
|
client.radio.delete(msg.guild.id);
|
||||||
msg.channel.send(client.messageEmojis["stop"] + client.messages.stop);
|
msg.channel.send(client.messageEmojis["stop"] + client.messages.stop);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user