I an trying to add a song to a list if there is a song currently playing and after the song is over, play the next song in the list, after that song is over, play the next...
I have not been able to find the syntax or keyword for "song playing" or "once song is done"
The song playing works fine also without the queue
What I have tried
@commands.command()
async def play(self, ctx, song):
queue =[]
await self.join(ctx)
FFMPEG_OPTIONS = {'before_options':'-reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 5','options':'-vn'}
YDL_OPTIONS = {'format':'bestaudio'}
vc = ctx.voice_client
if "https://" in song:
songtype = "link"
if songtype == "link":
if queue == []:
queue.append(song)
playsong = queue.pop(0)
with youtube_dl.YoutubeDL(YDL_OPTIONS) as ydl:
info = ydl.extract_info(playsong, download=False)
url2 = info['formats'][0]['url']
source = await discord.FFmpegOpusAudio.from_probe(url2, **FFMPEG_OPTIONS)
vc.play(source)
else:
#Dont know where to go from here