From b0a1e8a7475b6f54d5afaafcd9e5e3532e4e5829 Mon Sep 17 00:00:00 2001 From: Elmon11 Date: Tue, 30 Mar 2021 01:19:01 +0200 Subject: [PATCH] Update checks.py --- checks.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/checks.py b/checks.py index 32cdd22..c1e4d7d 100644 --- a/checks.py +++ b/checks.py @@ -4,11 +4,14 @@ from discord.ext import commands class NoPermission(commands.MissingPermissions): pass + class notAdminCommand(Exception): - def __init__(self, message="The command you attempted does not exist or is not a whitelisted command for the adminconsole."): - self.message=message + def __init__(self, + message="The command you attempted does not exist or is not a whitelisted command for the adminconsole."): + self.message = message super().__init__(self.message) + def is_staff(): def predicate(ctx): user = ctx.message.author @@ -102,8 +105,10 @@ def is_smp_owner(): return True else: raise NoPermission(['IS_GMOD_OWNER']) + return commands.check(predicate) + def is_gmod_owner(): def predicate(ctx): user = ctx.message.author