Events/revealroles_role
< Events
Jump to navigation
Jump to search
The revealroles_role event is called multiple times during the execution of !revealroles, once per combination of a nickname and a role or template it has.
Event callback
def on_revealroles_role(event: Event, cli: IRCClient, var: module, nick: str, role: str) -> None
- The default action adds information about role swaps, listing what the nick's original role was. If the default action is prevented, this information is not shown.
event
: The event objectcli
: The IRC connectionvar
: Reference to the src.settings modulenick
: Nick being revealedrole
: The role or template being revealed for nick
Event data
{
"special_case": list(str)
}
The special_case list may initially have some data in it. Adding things to the list will have those data items appear in parenthesis next to the nick. This is useful if additional data about the role should be shown.