feat: added handling for if no user is provided to dl-blacklist
This commit is contained in:
parent
8cb0484d93
commit
f2f7cafc02
1 changed files with 2 additions and 0 deletions
|
@ -169,6 +169,8 @@ class MusicDownloader(commands.Cog):
|
||||||
@commands.group(name="dl-blacklist", invoke_without_command=True)
|
@commands.group(name="dl-blacklist", invoke_without_command=True)
|
||||||
async def blacklist(self, ctx: commands.Context, user: discord.User = None):
|
async def blacklist(self, ctx: commands.Context, user: discord.User = None):
|
||||||
"""Group command for managing the blacklist."""
|
"""Group command for managing the blacklist."""
|
||||||
|
if not user:
|
||||||
|
user = ctx.author
|
||||||
data_path = str(data_manager.cog_data_path()) + f"{os.sep}MusicDownloader"
|
data_path = str(data_manager.cog_data_path()) + f"{os.sep}MusicDownloader"
|
||||||
db_path = os.path.join(data_path, "database.db")
|
db_path = os.path.join(data_path, "database.db")
|
||||||
if user is None:
|
if user is None:
|
||||||
|
|
Loading…
Reference in a new issue