mirror of
https://github.com/TotalFreedomMC/TotalFreedomBot.git
synced 2024-12-22 15:44:57 +00:00
Update checks.py
This commit is contained in:
parent
b9d91e0aa2
commit
b0a1e8a747
1 changed files with 7 additions and 2 deletions
|
@ -4,11 +4,14 @@ from discord.ext import commands
|
||||||
class NoPermission(commands.MissingPermissions):
|
class NoPermission(commands.MissingPermissions):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class notAdminCommand(Exception):
|
class notAdminCommand(Exception):
|
||||||
def __init__(self, message="The command you attempted does not exist or is not a whitelisted command for the adminconsole."):
|
def __init__(self,
|
||||||
|
message="The command you attempted does not exist or is not a whitelisted command for the adminconsole."):
|
||||||
self.message = message
|
self.message = message
|
||||||
super().__init__(self.message)
|
super().__init__(self.message)
|
||||||
|
|
||||||
|
|
||||||
def is_staff():
|
def is_staff():
|
||||||
def predicate(ctx):
|
def predicate(ctx):
|
||||||
user = ctx.message.author
|
user = ctx.message.author
|
||||||
|
@ -102,8 +105,10 @@ def is_smp_owner():
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
raise NoPermission(['IS_GMOD_OWNER'])
|
raise NoPermission(['IS_GMOD_OWNER'])
|
||||||
|
|
||||||
return commands.check(predicate)
|
return commands.check(predicate)
|
||||||
|
|
||||||
|
|
||||||
def is_gmod_owner():
|
def is_gmod_owner():
|
||||||
def predicate(ctx):
|
def predicate(ctx):
|
||||||
user = ctx.message.author
|
user = ctx.message.author
|
||||||
|
|
Loading…
Reference in a new issue