Skip to content

Instantly share code, notes, and snippets.

@RAnders00
Forked from tolekk/Pepega
Created November 28, 2019 14:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RAnders00/99b92e131873e9efc5f3f6c7aab26113 to your computer and use it in GitHub Desktop.
Save RAnders00/99b92e131873e9efc5f3f6c7aab26113 to your computer and use it in GitHub Desktop.
Pepega
const { ChatClient } = require("dank-twitch-irc");
//Config with login and passwd.
let client = new ChatClient({
username: "tolekkbot",
password: "superlongpasswordnam",
rateLimits: "verifiedBot"
});
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("tolekk");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment