mirror of
https://github.com/myned/modufur.git
synced 2024-12-24 14:27:27 +00:00
Added check for list of permitted ids
This commit is contained in:
parent
41c5f86181
commit
02e69edba7
1 changed files with 5 additions and 0 deletions
|
@ -9,6 +9,7 @@ with open('config.json') as infile:
|
||||||
config = json.load(infile)
|
config = json.load(infile)
|
||||||
|
|
||||||
owner_id = config['owner_id']
|
owner_id = config['owner_id']
|
||||||
|
listed_ids = config['listed_ids']
|
||||||
|
|
||||||
def is_owner():
|
def is_owner():
|
||||||
async def predicate(ctx):
|
async def predicate(ctx):
|
||||||
|
@ -22,6 +23,10 @@ def is_mod():
|
||||||
def predicate(ctx):
|
def predicate(ctx):
|
||||||
return ctx.message.author.guild_permissions.ban_members
|
return ctx.message.author.guild_permissions.ban_members
|
||||||
return commands.check(predicate)
|
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):
|
def owner(ctx):
|
||||||
return ctx.message.author.id == owner_id
|
return ctx.message.author.id == owner_id
|
||||||
|
|
Loading…
Reference in a new issue