title: How to make my bot leave a voice channel if there is no one in the channel
body: <p>I recently created a discord bot that plays radio, and I would like to know how to make sure that when there is no one the bot channeling it.</p>
  <pre><code>
    if (oldState.channelID !==  oldState.guild.me.voice.channelID || newState.channel)
      return;
  
    // otherwise, check how many people are in the channel now
    if (!oldState.channel.members.size === 1) 
      setTimeout(() =&gt; { // if 1 (you), wait five minutes
        if (!oldState.channel.members.size === 1) // if there's still 1 member, 
           oldState.channel.leave(); // leave
       }, 10);
  });
  </code></pre>
  <p>I tested this and it doesn't work, could someone help me? thx!</p>