rluba / twitch_irc

A Twitch IRC library written in Jai

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Twitch IRC library in jai

Loosely based on libtwirc and pretty much untested for now.

Usage

twitch: Twitch_Chat;
init(*twitch, event_callback, verbose = true);
success = connect(*twitch, username, password);
if !success then exit(1);

while true {
    log("Updating…");
    success = update(*twitch);
    if !success then break; // Or reconnect or whatever
}

deinit(*twitch);

event_callback :: (event: Twitch_Event) {
    if event.type == {
        case;
            log("Got event: %", event);
    }
}

About

A Twitch IRC library written in Jai