From a13887de585231796ca31e15934eb42bd781d3d3 Mon Sep 17 00:00:00 2001 From: BFlow Date: Wed, 29 Apr 2020 17:46:31 +0200 Subject: [PATCH] correction command play --- kabot/kabot/kabot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kabot/kabot/kabot.py b/kabot/kabot/kabot.py index 43ba85c..8eeb6d2 100644 --- a/kabot/kabot/kabot.py +++ b/kabot/kabot/kabot.py @@ -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)