How can I queue songs in my discord music bot?

  discord,, python

I am working on a discord music bot and I need help queuing songs. It streams audio from YouTube directly into the VC it is connected to. What I need here is to wait for the current song to stop and then execute the user command for the second song and so on.

    if not
        return await ctx.send('You are not in a voice channel.')
    async def play(self, ctx, url):
        print("command active")
        channel =
        voice = get(self.client.voice_clients, guild=ctx.guild)
        if voice and voice.is_connected():
            await voice.move_to(channel)
            voice = await channel.connect()
            FFMPEG_OPTIONS = {'before_options': '-reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 5', 'options': '-vn'}
            ydl_opts = {'format': 'bestaudio'}
            with youtube_dl.YoutubeDL(ydl_opts) as ydl:
                info = ydl.extract_info(url, download=False)
                URL = info['formats'][0]['url']

Source: Python Questions