15
functions/checks.py
Normal file
15
functions/checks.py
Normal file
@@ -0,0 +1,15 @@
|
||||
import discord
|
||||
from data import constants
|
||||
|
||||
|
||||
# Checks if an author is a dev
|
||||
def isDev(ctx):
|
||||
return ctx.author.id in constants.devIDs
|
||||
|
||||
|
||||
def isAdmin(ctx):
|
||||
return isDev(ctx) or any(role.id in constants.adminRoles for role in ctx.author.roles)
|
||||
|
||||
|
||||
def isModPlus(ctx):
|
||||
return isDev(ctx) or any(role.id in constants.modPlusRoles for role in ctx.author.roles)
|
||||
Reference in New Issue
Block a user