title: Discord.py rewrite - what is the source for YoutubeDL to play music?
body: <p>As mentioned in the docs <a href="https://discordpy.readthedocs.io/en/latest/api.html#voice" rel="nofollow noreferrer">here</a>, I need to use a source to play music using the play() command, I am trying to use YoutubeDL but I can't figure it out.</p>
  
  <p>I have checked the rapptz discord.py basic voice example, but since I'm not using object-oriented programming its confusing me quite alot. Everywhere I have looked, their example is using the v0.16 discord.py, and I can't work out how to convert this <code>player = await voice_client.create_ytdl_player(url)</code> into the rewrite.</p>
  
  <p>My play function at the moment looks like this: </p>
  
  <pre><code>async def play(ctx, url = None):
  ...
  player = await YTDLSource(url) 
      await ctx.voice_client.play(player)
      await ctx.send("Now playing: " + player.title())
  </code></pre>
  
  <p>"YTDLSource" being a placeholder for the source.</p>
  
  <p>Any help greatly appreciated, thanks.</p>