Skip to content
Docs
How disko works

Roles

Named powers a game declares, who holds them by default, and how rooms and people hand them out.

A role is a named power a game checks before it lets someone do something, such as host (start matches and set the teams) or referee.

Each role has a default holder:

DefaultWho holds it
Everyoneevery player
Ownerthe room owner
Nobodyno one, until the game, the room or a person gives it

Who holds a role is decided in this order:

  1. Room code, such as "admins are hosts".

  2. A person in the room, in the Room management modal.

  3. The game itself, while it runs.

  4. The default.

Rooms have roles of their own too, such as Admin. Room roles are powers over the room (kick, ban, options); games never see them.

The Menu and HUD use roles directly: a control can require one, and players without it see the control disabled. Rules can test them with {player} has {role}.

In the Studio, roles live on the Roles page. In code, a game declares them with game.role(...); see Roles and moderation for how rooms decide.