feat: added owner checks to blacklist_add and blacklist_remove
This commit is contained in:
parent
b2f4e9f3e5
commit
225c13ade9
1 changed files with 2 additions and 0 deletions
|
@ -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")
|
||||
|
|
Loading…
Reference in a new issue