title: Discord.py Musicbot Skip Command PermissionError
body: <p>So as my first &quot;major&quot; project after starting to program, I've decided to make a Discord Bot. The problem here is my &quot;skip&quot; command. Somehow it works but I can't understand how.</p>
  <pre><code>def play_next(ctx):
  if len(songs_list) &gt;= 2:
      print(songs_list,&quot;before del&quot;)
      del songs_list[0]
      print(songs_list[0], &quot;new song&quot;)
  
      
      try:
          if os.path.isfile(&quot;song.mp3&quot;):
              os.remove(&quot;song.mp3&quot;)
      except PermissionError:
          print(&quot;permissionerror&quot;)
      with youtube_dl.YoutubeDL(ydl_opts) as ydl:
          ydl.download([songs_list[0]])
      for file in os.listdir(&quot;./&quot;):
          if file.endswith(&quot;.mp3&quot;):
              os.rename(file, &quot;song.mp3&quot;)
      voice.play(discord.FFmpegPCMAudio(&quot;song.mp3&quot;), after=lambda e: play_next(ctx))
      voice.isplaying()
  </code></pre>
  <p>And the skip command:</p>
  <pre><code>@client.command(pass_context=True)
  async def skip(ctx):
  voice.stop()
  voice.skip()
  try:
    os.remove(&quot;song.mp3&quot;)
  except:
    pass
  play_next(ctx)
  </code></pre>
  <p>I know it isn't the best way of handling that, but I am just beginning to code and this is how I got it to work.
  In the skip command, when I didn't use voice.skip() I would have gotten a PermissionError printed out in the console.</p>
  <p>With it included, I instead get the message &quot;VoiceClient&quot; object has no attribute &quot;skip&quot;, but everything works in order so far. Can someone explain why?
  I mean if skip doesn't exist, then why does it work? And how does it bypass the PermissionError?</p>