PowerLevelsHelper

class PowerLevelsHelper(powerLevelsContent: PowerLevelsContent)

This class is an helper around PowerLevelsContent.

Constructors

Link copied to clipboard
constructor(powerLevelsContent: PowerLevelsContent)

Functions

Link copied to clipboard

Returns the user power level of a dedicated user Id.

Link copied to clipboard
fun getUserRole(userId: String): Role

Returns the user power level of a dedicated user Id.

Link copied to clipboard

Check if the user have the necessary power level to ban.

Link copied to clipboard

Check if the user have the necessary power level to invite.

Link copied to clipboard

Check if the user have the necessary power level to kick (remove).

Link copied to clipboard

Check if the user have the necessary power level to redact.

Link copied to clipboard
fun isUserAllowedToSend(userId: String, isState: Boolean, eventType: String?): Boolean

Tell if an user can send an event of a certain type.