From 1aca41b5c9cfa8748410cbe1ba8ee75b053de483 Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Tue, 1 Aug 2023 15:04:36 -0400 Subject: [PATCH] fix: added handling for if no data path is provided in change_data_path --- musicdownloader/musicdownloader.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/musicdownloader/musicdownloader.py b/musicdownloader/musicdownloader.py index c9e5232..879040b 100644 --- a/musicdownloader/musicdownloader.py +++ b/musicdownloader/musicdownloader.py @@ -18,6 +18,8 @@ class MusicDownloader(commands.Cog): async def change_data_path(self, ctx: commands.Context, data_path: str = None): """This command changes the data path this cog outputs to.""" old_path = await self.config.save_directory() + if not data_path: + await ctx.send(f"The current data path is `{old_path}`.") if os.path.isdir(data_path): await self.config.save_directory.set(data_path) embed=discord.Embed(color=await self.bot.get_embed_color(None), description=f"The save directory has been set to `{data_path}`.\n It was previously set to `{old_path}`.")