Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

213
Views
voiceStateUpdate event doesn't do anything

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())
        }
    }
});
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!