Skip to main content

Command Constraints

Constraints limit what values a role may pass to a specific command parameter — for example capping a moderator's !ban duration. They're indexed by parameter position (1-based) and inherited through extends.

Shape depends on the parameter type:

-- number / duration
{ min = 60, max = 3600 }

-- string / role (whitelist of allowed values)
{ "user", "vip" }
warning

superadmin is never constrained.

If a player has multiple roles, the least restrictive constraint wins. A role with no constraint at all removes the restriction entirely.

See the Lyn.Role.*CommandConstraints functions for reading and writing them.