예제 #1
0
 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
예제 #2
0
 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
예제 #3
0
 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
예제 #4
0
 def has_applied(self, UID):
     UID = str(UID)
     if sql.Entry_Check(UID, "userid", "applications"):
         return True
예제 #5
0
 def owner_check(self, UID):
     UID = str(UID)
     if sql.Entry_Check(UID, "id", "owners"):
         return True
예제 #6
0
            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"):
예제 #7
0
 def already_support_role(self, roleid):
     if sql.Entry_Check(str(roleid), "roleid", "colour_roles"):
         return True