voice chat leave detection
This commit is contained in:
parent
4d97bc1ad0
commit
69815dbdf2
1 changed files with 13 additions and 0 deletions
13
events/voiceStateUpdate.js
Normal file
13
events/voiceStateUpdate.js
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
// Copyright 2020 Emily J. / mudkipscience and contributors. Subject to the AGPLv3 license.
|
||||||
|
|
||||||
|
const music = require('../utils/music');
|
||||||
|
|
||||||
|
module.exports = (client, oldState, newState) => {
|
||||||
|
if(newState.channelID != oldState.channelID) {
|
||||||
|
let guild = music.getGuild(newState.guild.id);
|
||||||
|
|
||||||
|
if(guild.playing && guild.voiceChannel.id == oldState.channelID) {
|
||||||
|
console.log(newState.id + ' left VC, in which Woomy is playing music');
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue