feat: added handling for if no user is provided to dl-blacklist

This commit is contained in:
SeaswimmerTheFsh 2023-08-02 01:24:27 -04:00
parent 8cb0484d93
commit f2f7cafc02
No known key found for this signature in database
GPG key ID: 5019678FD9CF50D8

View file

@ -169,6 +169,8 @@ class MusicDownloader(commands.Cog):
@commands.group(name="dl-blacklist", invoke_without_command=True)
async def blacklist(self, ctx: commands.Context, user: discord.User = None):
"""Group command for managing the blacklist."""
if not user:
user = ctx.author
data_path = str(data_manager.cog_data_path()) + f"{os.sep}MusicDownloader"
db_path = os.path.join(data_path, "database.db")
if user is None: