コード例 #1
0
def check_if_can_learn(ctx):
    """Return true if the command user can use the command "learn"
    Command check function
    """
    if can_use_learn(ctx.author.id):
        return True
    else:
        raise RoleCannotUseCommand("Cannot use learn command (BoTC)")
コード例 #2
0
def check_if_can_protect(ctx):
    """Return true if the command user can use the command "protect"
    Command check function
    """
    if can_use_protect(ctx.author.id):
        return True
    else:
        raise RoleCannotUseCommand("Cannot use protect command (BoTC)")