roleFor

fun roleFor(event: Event): RoleBehavior?

Retrieves a role that is the subject of a given event, if possible.

This function only supports a specific set of events - any unsupported events will simply result in a null value. Please note that some events may support a null value for this type of object, and this will also be reflected in the return value.

Return

A RoleBehavior representing the role, or null if missing.

Parameters

event

The event concerning to the channel to retrieve.