Advertisement
Guest User

Untitled

a guest
Apr 28th, 2017
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.14 KB | None | 0 0
  1. var tmi = require('tmi.js');
  2. var timeout=1500;// change this
  3.  
  4. var phrases=[
  5. "Happinessltd, I love you! (No Homo) FeelsBadMan",
  6. "FailFish",
  7. "danWave",
  8. "baconNub",
  9. "sbzyFeedMe",
  10. "waffleHeart",
  11. "danPuke",
  12. "GivePLZ EVERYONE TAKE MY ENERGY! TakeNRG",
  13. "Kappa",
  14. "Happinessltd, I love you! (Full Homo) KappaPride"
  15. ];
  16. var options = {
  17. options: {
  18. debug: true
  19. },
  20. connection: {
  21. cluster: "aws",
  22. reconnect: true
  23. },
  24. identity: {
  25. username: "genstuk0v",
  26. password: "oauth:kas6ybsa4z7kga42jgvnxymginp59s"
  27. },
  28. channels: ["happinessltd"]
  29. };
  30.  
  31. var client = new tmi.client(options);
  32. client.connect();
  33.  
  34. client.on('connected', function (address, port) {
  35. console.log("Address: " + address + " Port: " + port);
  36. });
  37.  
  38. client.addListener('join', function(channel, username) {
  39. sayPhrase();
  40. setInterval(sayPhrase,timeout);
  41. });
  42.  
  43.  
  44. function sayPhrase() {
  45. client.say("happinessltd", phrases[Math.floor(Math.random()* phrases.length)]);
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement