From 225c13ade921b61682ccc364abfceef5af479047 Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Wed, 2 Aug 2023 01:07:57 -0400 Subject: [PATCH] feat: added owner checks to blacklist_add and blacklist_remove --- musicdownloader/musicdownloader.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/musicdownloader/musicdownloader.py b/musicdownloader/musicdownloader.py index 99f6bcc..60c2ab0 100644 --- a/musicdownloader/musicdownloader.py +++ b/musicdownloader/musicdownloader.py @@ -186,6 +186,7 @@ class MusicDownloader(commands.Cog): con.close() @blacklist.command(name='add') + @checks.is_owner() async def blacklist_add(self, ctx, user: discord.User, *, reason: str = None): data_path = str(data_manager.cog_data_path()) + f"{os.sep}MusicDownloader" db_path = os.path.join(data_path, "database.db") @@ -203,6 +204,7 @@ class MusicDownloader(commands.Cog): await ctx.send(f"{user.mention} has been added to the blacklist with the reason: {reason or 'No reason provided.'}") @blacklist.command(name='remove') + @checks.is_owner() async def blacklist_remove(self, ctx, user: discord.User): data_path = str(data_manager.cog_data_path()) + f"{os.sep}MusicDownloader{os.sep}Data" db_path = os.path.join(data_path, "database.db")