discord_rust_framework 0.0.1

A very high-level library for creating simple bots for Discord.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#[cfg(test)]
mod tests {
    extern crate env_logger;

    #[test]
    fn initialization_test() {
        env_logger::init().unwrap();
        ::Client::new(String::from("MzQ5OTEyMTE1OTYxNzkwNDY0.DH8YkQ.sUB4M6AlSJAZapL3f8lQyyE7SOg"), |message| {
            match message {
                "oh" => Some(String::from("ok")),
                _ => None
            }
        });
    }
}