Advertisement
Guest User

Untitled

a guest
Apr 25th, 2019
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.24 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(
  26. "#twitchplayspokemon", ".w tpp pinball t2"
  27. )
  28. ;
  29. }, 5000);
  30. }
  31. else return;
  32. }
  33. if(message.includes("started playing on the gold")) {
  34. if(userstate["display-name"] === "tpp"){
  35. setTimeout(function() {
  36. client.say(
  37. "#twitchplayspokemon", ".w tpp pinball t2"
  38. )
  39. ;
  40. }, 5000);
  41. }
  42. else return;
  43. }
  44. if(message.includes("started playing on the silver")) {
  45. if(userstate["display-name"] === "tpp"){
  46. setTimeout(function() {
  47. client.say(
  48. "#twitchplayspokemon", ".w tpp pinball t1"
  49. )
  50. ;
  51. }, 5000);
  52. }
  53. else return;
  54. }
  55. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement