woomy/events/voiceStateUpdate.js

13 lines
472 B
JavaScript
Raw Normal View History

2020-04-22 07:39:46 +00:00
// 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');
};
}
}