Created
June 13, 2023 14:34
-
-
Save pajlada/58ae124dbca848a9ce61e6854b044bf5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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