Struct matrix_bot_api::MatrixBot[][src]

pub struct MatrixBot { /* fields omitted */ }

Methods

impl MatrixBot
[src]

Consumes any struct that implements the MessageHandler-trait.

Add an additional handler. Each message will be given to all registered handlers until one of them returns "HandleResult::StopHandling".

If true, will print all Matrix-message coming in and going out (quite verbose!) to stdout Default: false

Blocking call that runs as long as the Bot is running. Will call for each incoming text-message the given MessageHandler. Bot will automatically join all rooms it is invited to. Will return on shutdown only. All messages prior to run() will be ignored.

Will shutdown the bot. The bot will not leave any rooms.

Will leave the given room (give room-id, not room-name)

Sends a message to a given room, with a given message-type.

  • msg: The incoming message
  • room: The room-id, the message should be sent to
  • msgtype: Type of message (text or notice)

Auto Trait Implementations

impl !Send for MatrixBot

impl !Sync for MatrixBot