Skip to content

self_roles_reorder

Change the order of the roles you have. Your name takes its color from the first role in your list that has one, so this lets you pick which role shows. It doesn’t add or remove roles, and doesn’t change role rank.

{
"cmd": "self_roles_reorder",
"roles": ["supporter", "photography", "user"]
}
Field Type Required Description
roles string[] Yes Every role name you have, in the order you want. Must contain exactly your current roles, no more and no fewer.

The reply is a user_roles_get frame, not self_roles_reorder:

{
"cmd": "user_roles_get",
"user": "alice",
"roles": ["supporter", "photography", "user"],
"color": "#f59e0b",
"gradient": []
}

See user_roles_get for the fields. Every other authenticated connection receives the same frame.

  • Every role you have is included, not only self-assignable ones. Fetch your current list with user_roles_get first.
  • The order you send is saved as is.

Any member can call it. It is blocked while you are timed out.

val When
Roles must match your current roles roles has a different number of entries than your role list, or leaves one of your roles out.
Failed to reorder your roles The server could not write the change to storage.
Validation message roles is missing, empty, or contains a non-string.