I have a problem since the v13 update of discord.js. I can log the channels (oldState, newState) but the code is not executing and returns no errors!
Here is my code:
client.on('voiceStateUpdate', async (oldState, newState) => {
console.log(oldState) //I got the channel on the console
//But the lines below not work at all since the v13 update
if(oldState.channelID == '825407723129536543') {
console.log(`old state is > ${oldState.channelID}`)
if(oldState.channel.members.size == 0) {
oldChannel = client.channels.cache.find(c => c.name == "test")
client.channels.cache.find(c => c.name == "test").clone(undefined, true, false, 'Needed a clone')
.then(oldChannel.delete())
}
}
});