13
data/constants.py
Normal file
13
data/constants.py
Normal file
@@ -0,0 +1,13 @@
|
||||
# Our Discord User ID's
|
||||
stijnID = 171671190631481345
|
||||
victorID = 632196710323585025
|
||||
wcbID = 760529466027016252
|
||||
devIDs = [stijnID, victorID]
|
||||
|
||||
# Admin role ID's
|
||||
roleAdmin = 730709756125249588
|
||||
roleMod = 688328855605346339
|
||||
roleOwner = 687996070986383436
|
||||
|
||||
adminRoles = [roleAdmin, roleOwner]
|
||||
modPlusRoles = [roleAdmin, roleMod, roleOwner]
|
||||
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