[−][src]Struct matrix_bot_api::ActiveBot
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]
&self,
msg: &str,
html: &str,
room: &str,
msgtype: MessageType
)
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
Auto Trait Implementations
impl !RefUnwindSafe for ActiveBot
impl Send for ActiveBot
impl !Sync for ActiveBot
impl Unpin for ActiveBot
impl !UnwindSafe for ActiveBot
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
U: TryFrom<T>,