mirror of
https://github.com/warengroup/eximiabots-radiox.git
synced 2024-11-10 06:20:20 +00:00
Update voiceStateUpdate event
This commit is contained in:
parent
2b72f87256
commit
1533ae46a4
@ -16,7 +16,6 @@ module.exports = {
|
|||||||
if (newState.channel === null) {
|
if (newState.channel === null) {
|
||||||
client.funcs.statisticsUpdate(client, newState.guild, radio);
|
client.funcs.statisticsUpdate(client, newState.guild, radio);
|
||||||
radio.connection?.destroy();
|
radio.connection?.destroy();
|
||||||
radio.audioPlayer?.stop();
|
|
||||||
radio.message?.delete();
|
radio.message?.delete();
|
||||||
client.funcs.logger('Radio', 'Stream stopped' + " / " + newState.guild.id);
|
client.funcs.logger('Radio', 'Stream stopped' + " / " + newState.guild.id);
|
||||||
return client.radio.delete(newState.guild.id);
|
return client.radio.delete(newState.guild.id);
|
||||||
@ -39,7 +38,6 @@ module.exports = {
|
|||||||
} catch (error) {
|
} catch (error) {
|
||||||
client.funcs.statisticsUpdate(client, newState.guild, radio);
|
client.funcs.statisticsUpdate(client, newState.guild, radio);
|
||||||
radio.connection?.destroy();
|
radio.connection?.destroy();
|
||||||
radio.audioPlayer?.stop();
|
|
||||||
radio.message?.delete();
|
radio.message?.delete();
|
||||||
client.funcs.logger('Radio', 'Stream stopped' + " / " + newState.guild.id);
|
client.funcs.logger('Radio', 'Stream stopped' + " / " + newState.guild.id);
|
||||||
client.radio.delete(oldState.guild.id);
|
client.radio.delete(oldState.guild.id);
|
||||||
@ -59,7 +57,6 @@ module.exports = {
|
|||||||
if (radio.voiceChannel.members.size === 1) {
|
if (radio.voiceChannel.members.size === 1) {
|
||||||
client.funcs.statisticsUpdate(client, newState.guild, radio);
|
client.funcs.statisticsUpdate(client, newState.guild, radio);
|
||||||
radio.connection?.destroy();
|
radio.connection?.destroy();
|
||||||
radio.audioPlayer?.stop();
|
|
||||||
radio.message?.delete();
|
radio.message?.delete();
|
||||||
client.funcs.logger('Radio', 'Stream stopped' + " / " + newState.guild.id);
|
client.funcs.logger('Radio', 'Stream stopped' + " / " + newState.guild.id);
|
||||||
client.radio.delete(newState.guild.id);
|
client.radio.delete(newState.guild.id);
|
||||||
|
Loading…
Reference in New Issue
Block a user