[−][src]Trait matrix_bot_api::handlers::MessageHandler
Any struct that implements this trait can be passed to a MatrixBot.
The bot will call handle_message()
on each arriving text-message
The result HandleResult defines if handle_message()
of other handlers will
be called with this message or not.
The bot will also call init_handler()
on startup to allow handlers to
setup any background work
Required methods
fn handle_message(&mut self, bot: &ActiveBot, message: &Message) -> HandleResult
Will be called for every text message send to a room the bot is in
Provided methods
fn init_handler(&mut self, _bot: &ActiveBot)
Will be called once the bot has started