def admin_check(self, UID): UID = str(UID) if sql.Entry_Check(UID, "id", "admins"): return True else: if sql.Entry_Check(UID, "id", "owners"): return True
async def is_admin(ctx): await ctx.message.delete() UID = str(ctx.author.id) if sql.Entry_Check(UID, "id", "admins") or sql.Entry_Check(UID, "id", "owners"): file = open("./utils/logs/Admin.log","a") file.write("[{}]: Admin Access Granted to {} | CMD - {}\n".format(datetime.datetime.utcnow().strftime("%d/%m/%Y at %H:%M:%S (System Time)"), ctx.author.id, ctx.message.content)) file.close() return True else: file = open("./utils/logs/Admin.log","a") file.write("[{}]: Admin Access Denied to {} | CMD - {}\n".format(datetime.datetime.utcnow().strftime("%d/%m/%Y at %H:%M:%S (System Time)"), ctx.author.id, ctx.message.content)) file.close() return False
async def is_supporter(ctx): await ctx.message.delete() for roles in ctx.author.roles: if sql.Entry_Check(str(roles.id), "roleid", "colour_roles"): return True
def has_applied(self, UID): UID = str(UID) if sql.Entry_Check(UID, "userid", "applications"): return True
def owner_check(self, UID): UID = str(UID) if sql.Entry_Check(UID, "id", "owners"): return True
file.close() return True else: file = open("./utils/logs/Admin.log","a") file.write("[{}]: Owner Access Denied to {} | CMD - {}\n".format(datetime.datetime.utcnow().strftime("%d/%m/%Y at %H:%M:%S (System Time)"), ctx.author.id, ctx.message.content)) file.close() return False async def is_admin(ctx): await ctx.message.delete() UID = str(ctx.author.id) <<<<<<< HEAD if sql.entry_check(UID, "id", "admins") or sql.entry_check(UID, "id", "owners"): file = open("./utils/logs/access.log","a") ======= if sql.Entry_Check(UID, "id", "admins") or sql.Entry_Check(UID, "id", "owners"): file = open("./utils/logs/Admin.log","a") >>>>>>> b9a7c9f61e56974b19a7d1a7b1f02b4ab519948c file.write("[{}]: Admin Access Granted to {} | CMD - {}\n".format(datetime.datetime.utcnow().strftime("%d/%m/%Y at %H:%M:%S (System Time)"), ctx.author.id, ctx.message.content)) file.close() return True else: file = open("./utils/logs/Admin.log","a") file.write("[{}]: Admin Access Denied to {} | CMD - {}\n".format(datetime.datetime.utcnow().strftime("%d/%m/%Y at %H:%M:%S (System Time)"), ctx.author.id, ctx.message.content)) file.close() return False async def is_supporter(ctx): await ctx.message.delete() for roles in ctx.author.roles: if sql.Entry_Check(str(roles.id), "roleid", "colour_roles"):
def already_support_role(self, roleid): if sql.Entry_Check(str(roleid), "roleid", "colour_roles"): return True