diff --git a/musicdownloader/musicdownloader.py b/musicdownloader/musicdownloader.py index 83c6d23..50d0754 100644 --- a/musicdownloader/musicdownloader.py +++ b/musicdownloader/musicdownloader.py @@ -88,9 +88,10 @@ class MusicDownloader(commands.Cog): msg = ctx.send message = await msg("YouTube Downloader started!") filename = youtube_download(self, url, data_path, message) + filename_str = str(filename) full_filename = os.path.join(data_path, filename) while not os.path.isfile(full_filename): await asyncio.sleep(0.5) if os.path.isfile(full_filename): with open(full_filename, 'rb') as file: - await ctx.send(content="YouTube Downloader completed!\nDownloaded file:", file=discord.File(file, {filename})) + await ctx.send(content="YouTube Downloader completed!\nDownloaded file:", file=discord.File(file, {filename_str}))