title: Discord bot using youtube_dl gives this error.. AttributeError: 'Bot' object has no attribute 'voice_client_in'
body: <p>im trying to make a discord bot that plays audio from youtube into vc, using youtube_dl. there are some errors when i run play[youtube url] in the chat</p>
  
  <pre><code>Traceback (most recent call last):
    File "C:\Users\User\AppData\Local\Programs\Python\Python37-32\lib\site-packages\discord\ext\commands\core.py", line 79, in wrapped
      ret = await coro(*args, **kwargs)
    File "C:\Users\User\AppData\Local\Programs\Python\Python37-32\bot1.py", line 169, in play
      voice_client = client.voice_client_in(server)
  AttributeError: 'Bot' object has no attribute 'voice_client_in'
  
  The above exception was the direct cause of the following exception:
  
  Traceback (most recent call last):
    File "C:\Users\User\AppData\Local\Programs\Python\Python37-32\lib\site-packages\discord\ext\commands\bot.py", line 863, in invoke
      await ctx.command.invoke(ctx)
    File "C:\Users\User\AppData\Local\Programs\Python\Python37-32\lib\site-packages\discord\ext\commands\core.py", line 728, in invoke
      await injected(*ctx.args, **ctx.kwargs)
    File "C:\Users\User\AppData\Local\Programs\Python\Python37-32\lib\site-packages\discord\ext\commands\core.py", line 88, in wrapped
      raise CommandInvokeError(exc) from exc
  discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'Bot' object has no attribute 'voice_client_in' 
  </code></pre>
  
  <p>this is the code i wrote for getting the bot to join the vc, it joins correctly, but upon playing something, theres no response and the upper shown error is given. </p>
  
  <pre><code>@client.command()
  async def join(ctx):
    channel = ctx.author.voice.channel
    await channel.connect()
  
  @client.command()
  async def leave(ctx):
    await ctx.voice_client.disconnect()
  
  
  
  @client.command(pass_context=True)
  async def play(ctx, url):
    server = ctx.message.guild
  
    voice_client = client.voice_client_in(server)
    players = await channel.connect_ytdl_player(url)
    players[server.id] = player
    player.start()    
  </code></pre>
  
  <p>what i guess is that this is due to the discord rewrite api, what can be changed here in order to run this correctly. any help would be greatly appreciated </p>