Read this guide carefully.
twitch-irc from node_modules and package.json.npm install tmi.js --save.var irc = require("twitch-irc"); to var irc = require("tmi.js");reconnect to false.serverType to random.User object now includes everything sent by Twitch when you receive a message.
emote to emotes.null instead of true.1 and 0 values to booleans (true and false).emotes to an object but the raw data is still available as emotes-raw.specials tag, use the new user-type by Twitch.client.getUsername() to get the current username.client.getOptions() to get the current options.display-name value from the user object.client.db. to client.nosql.. Change the path of the database using client.nosql.path("./db");.1client.nosql.path("./db"); 2 3client.nosql.insert("monsters", [ 4 {name: "sphinx", mythology: "greek", eyes: 2, sex: "f", hobbies: ["riddles","sitting","being a wonder"]}, 5 {name: "hydra", mythology: "greek", eyes: 18, sex: "m", hobbies: ["coiling","terrorizing","growing"]}, 6 {name: "huldra", mythology: "norse", eyes: 2, sex: "f", hobbies: ["luring","terrorizing"]}, 7 {name: "cyclops", mythology: "greek", eyes: 1, sex: "m", hobbies: ["staring","terrorizing"]}, 8 {name: "fenrir", mythology: "norse", eyes: 2, sex: "m", hobbies: ["growing","god-killing"]}, 9 {name: "medusa", mythology: "greek", eyes: 2, sex: "f", hobbies: ["coiling","staring"]} 10]).then(function() { 11 console.log("Inserted data, now getting cid 3.."); 12 13 client.nosql.get("monsters", 3).then(function(data) { 14 console.log(data); 15 }); 16});
Now compatible for the browser. There is no logging-to-file capabilities and we are not planning to re-add this feature.
client.whisper(username, message); to send a whisper. You have to be connected on the group server to send and receive whispers. Twitch is planning to move it to a new system, so it might break in the next weeks / months.Not yet implemented, use the request module if you need to query the API. This is not a priority for us.