mirror of
https://github.com/warengroup/eximiabots-radiox.git
synced 2024-12-22 20:53:17 +00:00
Updated voiceStateUpdate
This commit is contained in:
parent
f437797bed
commit
07e45ae54d
@ -1,3 +1,8 @@
|
|||||||
|
const {
|
||||||
|
getVoiceConnection,
|
||||||
|
joinVoiceChannel
|
||||||
|
} = require("@discordjs/voice");
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: "voiceStateUpdate",
|
name: "voiceStateUpdate",
|
||||||
async execute(client, oldState, newState) {
|
async execute(client, oldState, newState) {
|
||||||
@ -9,6 +14,7 @@ module.exports = {
|
|||||||
if (newState.member.id === client.user.id && oldState.member.id === client.user.id) {
|
if (newState.member.id === client.user.id && oldState.member.id === client.user.id) {
|
||||||
if (newState.channel === null) {
|
if (newState.channel === null) {
|
||||||
client.funcs.statisticsUpdate(client, newState.guild, radio);
|
client.funcs.statisticsUpdate(client, newState.guild, radio);
|
||||||
|
radio.audioPlayer.stop();
|
||||||
return client.radio.delete(newState.guild.id);
|
return client.radio.delete(newState.guild.id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user