Struct yobot::yobot::Yobot
[−]
[src]
pub struct Yobot { /* fields omitted */ }
Methods
impl Yobot
[src]
fn new() -> Yobot
[src]
Create a new yobot instance.
fn connect(&self, token: String, bot_name: String)
[src]
Connect slack Real Time API socket.
Once the socket is connected, messages will be directed to the listener.
fn add_listener<T>(&mut self, listener: T) -> &mut Yobot where
T: MessageListener + 'static,
[src]
T: MessageListener + 'static,
Add a MessageListener to the bot
The more listeners you have the more useful your bot becomes (for potentially loose definitions of useful :P).