diff --git a/kabot/kabot/kabot.py b/kabot/kabot/kabot.py index 0e28ef0..c87ef0a 100644 --- a/kabot/kabot/kabot.py +++ b/kabot/kabot/kabot.py @@ -318,7 +318,9 @@ class Mybot(commands.Cog): with youtube_dl.YoutubeDL(ydl_opts) as ydl: ydl.download([url]) info_dict = ydl.extract_info(url, download=False) - out_file = ydl.prepare_filename(info_dict).replace(".webm", ".mp3") + out_file = ydl.prepare_filename(info_dict) + extension = out_file.split('.')[-1] + out_file = out_file.replace(extension, 'mp3') self.sounds.append((out_file, ctx)) @commands.command()