topRoleLowerOrEqual

suspend fun <T : Event> CheckContext<T>.topRoleLowerOrEqual(builder: suspend (T) -> RoleBehavior)

Check asserting that the top role for the user an Event fired for is lower than or equal to a given

Only events that can reasonably be associated with a guild member are supported. Please raise an issue if an event you expected to be supported, isn't. role.

Returns CheckResult.Passed() if the user doesn't have any roles.

Parameters

builder

Lambda returning the role to compare to.


suspend fun <T : Event> CheckContext<T>.topRoleLowerOrEqual(id: Snowflake)

Check asserting that the top role for the user an Event fired for is lower than or equal to a given

Only events that can reasonably be associated with a guild member are supported. Please raise an issue if an event you expected to be supported, isn't. role.

Returns CheckResult.Passed() if the user doesn't have any roles.

Parameters

id

Role snowflake to compare to.