From 02e69edba7093bd910ce72a551601191e0b25501 Mon Sep 17 00:00:00 2001 From: Myned Date: Mon, 2 Oct 2017 15:20:50 -0400 Subject: [PATCH] Added check for list of permitted ids --- src/main/misc/checks.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/misc/checks.py b/src/main/misc/checks.py index 7376cc6..6876964 100644 --- a/src/main/misc/checks.py +++ b/src/main/misc/checks.py @@ -9,6 +9,7 @@ with open('config.json') as infile: config = json.load(infile) owner_id = config['owner_id'] +listed_ids = config['listed_ids'] def is_owner(): async def predicate(ctx): @@ -22,6 +23,10 @@ def is_mod(): def predicate(ctx): return ctx.message.author.guild_permissions.ban_members return commands.check(predicate) +def is_listed(): + def predicate(ctx): + return ctx.message.author.id in listed_ids + return commands.check(predicate) def owner(ctx): return ctx.message.author.id == owner_id