An API bot that automatically ranks members in your Roblox group based on configurable rules.
- Manual Ranking ā Rank any member via API
- Auto-Ranking ā Scheduled interval that promotes members based on time-in-group rules
- Rule Management ā Add/remove ranking rules via API
- Action Logging ā Every rank change is logged with timestamps
- Go to https://create.roblox.com/dashboard/credentials
- Create a new API key
- Add the Groups resource with Read and Write permissions
- Select your group
- Copy the API key
š Add ROBLOX_API_KEY here: https://www.val.town/x/jamesdopp/API/environment-variables?key=ROBLOX_API_KEY
š Add ROBLOX_GROUP_ID here: https://www.val.town/x/jamesdopp/API/environment-variables?key=ROBLOX_GROUP_ID
š Add API_SECRET here (optional, protects write endpoints): https://www.val.town/x/jamesdopp/API/environment-variables?key=API_SECRET
The auto-rank.ts interval runs on a schedule. Configure it in the Val Town UI or via the interval settings.
Returns group details and available endpoints.
Returns all roles in your group with their IDs and names.
Returns all members with their user IDs, current roles, and join dates.
{ "userId": "123456789", "roleId": "role_id_from_/roles" }
Returns all configured auto-ranking rules.
{ "sourceRoleId": "current_role_id", "targetRoleId": "target_role_id", "minDaysInGroup": 7 }
This means: If a member has the source role and has been in the group for 7+ days, promote them to the target role.
Runs the auto-ranking engine immediately and returns results.
Returns recent ranking actions.
- The interval fetches all group roles and members
- For each member, it checks enabled rules sorted by
minDaysInGroup(highest first) - If a member's current role matches a rule's source role AND they've been in the group long enough ā they get promoted
- Every promotion is logged in SQLite
- Call
GET /rolesto find your role IDs - Call
POST /ruleswith the "Member" role as source, "Veteran" role as target, andminDaysInGroup: 7 - The auto-rank interval will automatically promote eligible members
main.ts ā HTTP API (Hono) ā manual ranking, rules, logs
auto-rank.ts ā Interval ā scheduled auto-promotion engine
roblox.ts ā Roblox Open Cloud API helper
db.ts ā SQLite for rules & logs