Skip to main content

on_message

Method
This is a method of the BotProtocol class in the protocols module.
Register a message handler.

Signature

def on_message(handler: Callable[[BotMessage], Any]) -> Callable

Parameters

handler
Callable
required
Function to call when a message is received

Returns

Returns
Callable
The handler function (for decorator use)

Source

View on GitHub

praisonaiagents/bots/protocols.py at line 399