correction command play
This commit is contained in:
parent
f238171ca1
commit
a13887de58
1 changed files with 2 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue