Skip to content
This repository has been archived by the owner on Jul 23, 2021. It is now read-only.

Commit

Permalink
Fix of permissions bug where admin commands don't accept the superuse…
Browse files Browse the repository at this point in the history
…r as a user with the powers to run those commands

Signed-off-by: dssecret <dsstudios.spam@gmail.com>
  • Loading branch information
dssecret committed Jan 16, 2021
1 parent 61d5470 commit 51c664b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ async def setvaultchannel(self, ctx):
Sets the channel that withdrawal messages are sent to in config.ini
'''

if not check_admin(ctx.message.author) and ctx.message.author.id == self.config["DEFAULTS"]["superuser"]:
if not check_admin(ctx.message.author) and ctx.message.author.id != self.config["DEFAULTS"]["superuser"]:
embed = discord.Embed()
embed.title = "Permission Denied"
embed.description = "This command requires the sender to be an Administrator. " \
Expand Down Expand Up @@ -64,7 +64,7 @@ async def setvaultrole(self, ctx, role: discord.Role):
Sets the role is pinged with withdrawal messages in config.ini
'''

if not check_admin(ctx.message.author) and ctx.message.author.id == self.config["DEFAULTS"]["superuser"]:
if not check_admin(ctx.message.author) and ctx.message.author.id != self.config["DEFAULTS"]["superuser"]:
embed = discord.Embed()
embed.title = "Permission Denied"
embed.description = "This command requires the sender to be an Administrator. " \
Expand All @@ -91,7 +91,7 @@ async def setprefix(self, ctx, arg="?"):
Sets the prefix for the bot in config.ini
'''

if not check_admin(ctx.message.author) and ctx.message.author.id == self.config["DEFAULTS"]["superuser"]:
if not check_admin(ctx.message.author) and ctx.message.author.id != self.config["DEFAULTS"]["superuser"]:
embed = discord.Embed()
embed.title = "Permission Denied"
embed.description = "This command requires the sender to be an Administrator. " \
Expand Down Expand Up @@ -119,7 +119,7 @@ async def setnoobrole(self, ctx, role: discord.Role):
Sets the role given to users under level 15 in config.ini
'''

if not check_admin(ctx.message.author) and ctx.message.author.id == self.config["DEFAULTS"]["superuser"]:
if not check_admin(ctx.message.author) and ctx.message.author.id != self.config["DEFAULTS"]["superuser"]:
embed = discord.Embed()
embed.title = "Permission Denied"
embed.description = "This command requires the sender to be an Administrator. " \
Expand Down Expand Up @@ -147,7 +147,7 @@ async def runnoob(self, ctx):
but are above level 15.
'''

if not check_admin(ctx.message.author) and ctx.message.author.id == self.config["DEFAULTS"]["superuser"]:
if not check_admin(ctx.message.author) and ctx.message.author.id != self.config["DEFAULTS"]["superuser"]:
embed = discord.Embed()
embed.title = "Permission Denied"
embed.description = "This command requires the sender to be an Administrator. " \
Expand Down Expand Up @@ -231,7 +231,7 @@ async def setguild(self, ctx):
Sets the guild ID in config.ini
'''

if not check_admin(ctx.message.author) and ctx.message.author.id == self.config["DEFAULTS"]["superuser"]:
if not check_admin(ctx.message.author) and ctx.message.author.id != self.config["DEFAULTS"]["superuser"]:
embed = discord.Embed()
embed.title = "Permission Denied"
embed.description = "This command requires the sender to be an Administrator. " \
Expand Down

0 comments on commit 51c664b

Please sign in to comment.