Clanbite Points Abilities

Awards points for a configured core/button reward (same caps and validation as the REST endpoint).

Ability
clanbite-points/button-click-award
Label
Award button-click points
Category
Access
Checked by a permission callback

Input

PropertyTypeDescription
points_type_key requiredstringPoint type key from settings.
reward_key requiredstringStable reward identifier (becomes action button_click_{key}).
points_per_click requiredintegerPoints to grant per successful award.
max_timesintegerHow many times the points can be earned within the period (0 = unlimited except once).
max_pointsintegerDeprecated: cap on total points within the period. Use max_times; ignored when max_times is sent.
period requiredstringonce, day, week, month, or year.
JSON Schema
{
    "type": "object",
    "properties": {
        "points_type_key": {
            "type": "string",
            "description": "Point type key from settings."
        },
        "reward_key": {
            "type": "string",
            "description": "Stable reward identifier (becomes action button_click_{key})."
        },
        "points_per_click": {
            "type": "integer",
            "description": "Points to grant per successful award."
        },
        "max_times": {
            "type": "integer",
            "description": "How many times the points can be earned within the period (0 = unlimited except once)."
        },
        "max_points": {
            "type": "integer",
            "description": "Deprecated: cap on total points within the period. Use max_times; ignored when max_times is sent."
        },
        "period": {
            "type": "string",
            "description": "once, day, week, month, or year.",
            "enum": [
                "once",
                "day",
                "week",
                "month",
                "year"
            ]
        }
    },
    "required": [
        "points_type_key",
        "reward_key",
        "points_per_click",
        "period"
    ]
}

Output

PropertyTypeDescription
awarded requiredinteger
JSON Schema
{
    "type": "object",
    "properties": {
        "awarded": {
            "type": "integer"
        }
    },
    "required": [
        "awarded"
    ]
}

Defined in inc/Points_Abilities.php

Changelog

VersionDescription
1.1.0Updated.