4 releases

0.2.0 Oct 24, 2020
0.1.2 Oct 22, 2020
0.1.1 Oct 22, 2020
0.1.0 Oct 22, 2020

#39 in #twitch

28 downloads per month

MIT license

8KB
124 lines

Connects to and allows communication with the Twitch Messaging Interface

Basic usage:

use madhouse_steve_tmi::Tmi;

let oauth_token = String::from("oauth:some_token_here");
let nick = String::from("MadSteveBot");
let rooms = vec![String::from("MadhouseSteve")];
let mut tmi = Tmi::new(oauth_token, nick, rooms);
let (join_handle, receiver) = tmi.start();
loop {
    let msg = receiver.recv();
    if msg.is_err() {
        break;
    }

    let msg = msg.unwrap();
    // Do something with the message here
}

join_handle.join().unwrap();

No runtime deps