Skip to main content

setRank

Changes a user’s rank in your Roblox group. The change is applied through BloxCord and recorded in your audit log, attributed to the acting user.
Authority rules. Unless the actor is the organization owner, they cannot rank a user who is at or above their own rank, and cannot assign a rank at or above their own. Ranks above the organization’s configured maximum rankable rank are also rejected. When a rule blocks the change, the method returns false.

Parameters

number | string
required
The UserId of the user whose rank will change.
string
required
The reason recorded in the audit log for the rank change.
number
required
The target group rank — the rank number (0–255), not the role name. It must correspond to an existing role in your group.
Player | table | number
required
Who is performing the change. See the actor object.

Returns

boolean
true if the rank change was accepted and applied. false if a rule blocked it (see authority rules above), the target rank does not exist, or the backend was unreachable.

Examples


getUserPermissions

Returns the list of BloxCord permission strings a player currently in the server holds, based on their roles and group rank. Results are cached per player for the duration of their session.
Unlike most methods, this takes a live Player instance (not a UserId), because it caches the result against the player.
Batchable as the permissions.get op with args { userId, rank } — see apiBatch. The op result is { permissions = {...} } (uncached).

Parameters

Player
required
The player whose permissions to fetch. Must be an in-server Player instance.

Returns

string[]
An array of permission identifiers the player holds. May be empty if the player has no special permissions.

Example


getUserRoles

Returns the BloxCord dashboard roles a player currently in the server holds, resolved from their manually-assigned roles plus any rank-bound roles their group rank qualifies for (bind-managed roles they don’t qualify for are excluded). Results are cached per player for the duration of their session. Discord binds on BC roles are not resolved here due to Discord API limits.
Unlike most methods, this takes a live Player instance (not a UserId), because it caches the result against the player.
Batchable as the roles.get op with args { userId, rank } — see apiBatch. The op result is { roles = {...} } (uncached). The rank is the user’s group rank, used to resolve rank-bound roles.

Parameters

Player
required
The player whose roles to fetch. Must be an in-server Player instance.

Returns

object[]
An array of the dashboard roles the player holds. May be empty.

Example