Skip to content

Instantly share code, notes, and snippets.

@pajlada
Created June 13, 2023 14:34
Show Gist options
  • Save pajlada/58ae124dbca848a9ce61e6854b044bf5 to your computer and use it in GitHub Desktop.
Save pajlada/58ae124dbca848a9ce61e6854b044bf5 to your computer and use it in GitHub Desktop.
const { ChatClient } = require("@kararty/dank-twitch-irc");
let client = new ChatClient();
client.on("ready", () => console.log("Successfully connected to chat"));
client.on("close", (error) => {
if (error != null) {
console.error("Client closed due to error", error);
}
});
client.on("PRIVMSG", (msg) => {
console.log(`[#${msg.channelName}] ${msg.displayName}: ${msg.messageText}`);
});
// See below for more events
client.connect();
client.join("forsen");
{
"name": "node20-network-family-autoselection",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"@kararty/dank-twitch-irc": "^6.0.0"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment