[][src]Struct matrix_bot_api::ActiveBot

pub struct ActiveBot { /* fields omitted */ }

Handle for an active bot that allows sending message, leaving rooms and shutting down the bot

Methods

impl ActiveBot[src]

pub fn shutdown(&self)[src]

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

pub fn leave_room(&self, room_id: &str)[src]

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

pub fn send_message(&self, msg: &str, room: &str, msgtype: MessageType)[src]

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

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

pub fn send_html_message(
    &self,
    msg: &str,
    html: &str,
    room: &str,
    msgtype: MessageType
)
[src]

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

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

Trait Implementations

impl Clone for ActiveBot[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Err = <U as TryFrom<T>>::Err