pub fn run(&mut self) -> Result<(), String> {
        let mut client = RtmClient::new(&self.token[..]);
        let mut handler = SlackBotEventHandler::new(&self.name[..], &mut self.handlers);

        client.login_and_run(&mut handler)
    }
/// Tell your bot to start pulling its weight!
///
/// # Examples
///
/// ```
/// # use slackbot::{SlackBot, Sender};
/// # let mut my_bot = SlackBot::new("bot", "YOUR_API_TOKEN");
/// match my_bot.run() {
///     Ok(()) => println!("Bot shut down successfully. Goodbye world!"),
///     Err(err) => println!("Bot crashed. Error message: {}", err)
/// };
/// ```
Tell your bot to start pulling its weight!
Tell your bot to start pulling its weight!
pub fn run(&mut self) -> Result<(), String> {
        let mut client = RtmClient::new(&self.token[..]);
        let mut handler = SlackBotEventHandler::new(&self.name[..], &mut self.handlers);
        client.login_and_run(&mut handler)
    }
pub fn run ( & mut self ) -> Result < ( ) , String > { let mut client = RtmClient :: new ( & self . token [ .. ] ) ; let mut handler = SlackBotEventHandler :: new ( & self . name [ .. ] , & mut self . handlers ) ; client . login_and_run ( & mut handler ) }
Tell your bot to start pulling its weight!
Tell your bot to start pulling its weight!
&mut self
&mut self
examples
None
use slackbot::{slackbot, sender};
None
let mut my_bot = slackbot::new("bot", "your_api_token");
match my_bot.run() {
Ok(()) => println!("Bot shut down successfully. Goodbye world!"),
Err(err) => println!("Bot crashed.
match my_bot . run () { Ok (( )) = > println! ( " Bot shut down successfully . Goodbye world! " ) Err ( err ) = > println! ( " Bot crashed .