Advertisement
Guest User

Untitled

a guest
Apr 25th, 2019
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  1. var tmi = require("tmi.js");
  2.  
  3. var options = {
  4. options: {
  5. debug: true
  6. },
  7. connection: {
  8. cluster: "aws",
  9. reconnect: true
  10. },
  11. identity: {
  12. username: "expired_suzie",
  13. password: "oauth:n6vihcpb6e9h3imig3mh5zfltdayig"
  14. },
  15. channels: ["#twitchplayspokemon"]
  16. };
  17.  
  18. var client = new tmi.client(options);
  19. client.connect();
  20.  
  21. client.on("message", function (channel, userstate, message, self) {
  22. if(message.includes("started playing on the red")) {
  23. if(userstate["display-name"] === "tpp"){
  24. setTimeout(function() {
  25. client.say("#twitchplayspokemon", ".w tpp pinball t2");
  26. }, 5000);
  27. }
  28. else return;
  29. }
  30.  
  31. if(message.includes("started playing on the gold")) {
  32. if(userstate["display-name"] === "tpp"){
  33. setTimeout(function() {
  34. client.say("#twitchplayspokemon", ".w tpp pinball t2");
  35. }, 5000);
  36. }
  37. else return;
  38. }
  39.  
  40. if(message.includes("started playing on the silver")) {
  41. if(userstate["display-name"] === "tpp"){
  42. setTimeout(function() {
  43. client.say("#twitchplayspokemon", ".w tpp pinball t1");
  44. }, 5000);
  45. }
  46. else return;
  47. }
  48.  
  49. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement