Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var tmi = require('tmi.js');
- var timeout = 1500;// timeout in millseconds change this
- var phrases = [
- "Happinessltd, I love you! (No Homo) FeelsBadMan",
- "FailFish",
- "danWave",
- "baconNub",
- "sbzyFeedMe",
- "waffleHeart",
- "danPuke",
- "GivePLZ EVERYONE TAKE MY ENERGY! TakeNRG",
- "Kappa",
- "Happinessltd, I love you! (Full Homo) KappaPride"
- ];
- var options = {
- options: {
- debug: true
- },
- connection: {
- cluster: "aws",
- reconnect: true
- },
- identity: {
- username: "none",
- password: "nono"
- },
- channels: ["happinessltd"]
- };
- var client = new tmi.client(options);
- client.connect();
- var sayPharseTimer;
- client.on('connected', function (address, port) {
- console.log("Address: " + address + " Port: " + port);
- sayPharseTimer = setInterval(sayPhrase, timeout);
- });
- client.on("disconnected", function (reason) {
- if (sayPharseTimer) {
- clearInterval(sayPharseTimer);
- }
- }
- );
- function sayPhrase() {
- client.say("happinessltd", phrases[Math.floor(Math.random() * phrases.length)]);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement