Receives inbound events: success hands the event to the consumer,
NotAccepted refuses it.
Functions#
__init__#
__init__(handle) -> None| Parameter | Type | Description |
|---|---|---|
handle | Callable[[ChatEvent], Effect[None, NotAccepted]] |
def __init__(self, handle: Callable[[ChatEvent], Effect[None, NotAccepted]]) -> None:
self._handle = handlehandle#
handle(event) -> Effect[None, NotAccepted]Hands event to the consumer; NotAccepted refuses it.
| Parameter | Type | Description |
|---|---|---|
event | ChatEvent |
Returns Effect[None, NotAccepted]
def handle(self, event: ChatEvent) -> Effect[None, NotAccepted]:
"""Hands ``event`` to the consumer; ``NotAccepted`` refuses it."""
return self._handle(event)