correction command play

This commit is contained in:
BFlow 2020-04-29 17:46:31 +02:00
parent f238171ca1
commit a13887de58

View file

@ -261,7 +261,7 @@ class Mybot(commands.Cog):
await ctx.channel.send("Tu peux reparler %s!" % member.mention)
@commands.command(help="Jouer un song a partir d'une video")
async def play(self, ctx, lien):
async def play(self, ctx, url):
ydl_opts = {'format': 'bestaudio/mp3', 'outtmpl': '/tmp/discord_%(title)s-%(id)s.%(ext)s',
'postprocessors': [{
'key': 'FFmpegExtractAudio',
@ -270,7 +270,7 @@ class Mybot(commands.Cog):
}],
}
with youtube_dl.YoutubeDL(ydl_opts) as ydl:
ydl.download([lien])
ydl.download([url])
info_dict = ydl.extract_info(url, download=False)
out_file = ydl.prepare_filename(info_dict)
self.sounds.append(out_file)