PowerLevelsHelper

class PowerLevelsHelper(powerLevelsContent: PowerLevelsContent)

This class is an helper around PowerLevelsContent.

Constructors

Link copied to clipboard
fun PowerLevelsHelper(powerLevelsContent: PowerLevelsContent)

Functions

Link copied to clipboard
fun getUserPowerLevelValue(userId: String): Int

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
fun isUserAbleToBan(userId: String): Boolean

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

Link copied to clipboard
fun isUserAbleToInvite(userId: String): Boolean

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

Link copied to clipboard
fun isUserAbleToKick(userId: String): Boolean

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

Link copied to clipboard
fun isUserAbleToRedact(userId: String): Boolean

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.