Как сделать плей лист для песен в дс боте?
Делаю музыку в боте, но почемуто музыка не добавляетса в плей лист, зарание спасибо вот код:
YDL_OPTIONS = {'format': 'worstaudio/best', 'noplaylist': 'False', 'simulate': 'True',
'preferredquality': '192', 'preferredcodec': 'mp3', 'key': 'FFmpegExtractAudio'}
FFMPEG_OPTIONS = {'before_options': '-reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 5', 'options': '-vn'}
server = None
list_of_song = []
@client.command(aliases = ['play', 'плей'])
async def play__(ctx, *, arg):
"""Грає музику"""
vc = await ctx.message.author.voice.channel.connect()
with YoutubeDL(YDL_OPTIONS) as ydl:
if 'https://' in arg:
info = ydl.extract_info(arg, download=False)
else:
info = ydl.extract_info(f"ytsearch:{arg}", download=False)['entries'][0]
url = info['formats'][0]['url']
vc.play(discord.FFmpegPCMAudio(executable="ffmpeg\\ffmpeg.exe", source=url, **FFMPEG_OPTIONS))```