Advertisement
Guest User

Untitled

a guest
Feb 3rd, 2019
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.64 KB | None | 0 0
  1. var tmi = require('tmi.js');
  2. var options = {
  3. options: {
  4. debug: true
  5. },
  6. connection: {
  7. cluster: "aws",
  8. reconnect: true
  9. },
  10. identity: {
  11. username: "Aroy",
  12. password: "oauth:ohemy3ysw17hk69l8rfyt6s29z5z5y"
  13. },
  14. channels: ["aroy"]
  15. };
  16.  
  17.  
  18. var client = new tmi.client(options);
  19. client.connect();
  20.  
  21.  
  22. //AROKH
  23.  
  24.  
  25. //as i connect
  26. client.on('connected', function(address, port) {
  27. client.say("aroy", "/me Aroy Connected");
  28. });
  29.  
  30.  
  31. client.on('chat', function(channel, user, message, self) {
  32. if(message === "!aroy") {
  33.  
  34. client.say("aroy", "Not available.");
  35.  
  36. }
  37. });
  38.  
  39. client.on('chat', function(channel, user, message, self) {
  40. if(message === "!mod" && user.mod) {
  41.  
  42. client.say("aroy", "FeelsModMan @" + user['display-name']);
  43.  
  44. }
  45. });
  46.  
  47.  
  48. client.on('hosting', function(channel, target, viewers) {
  49. client.say('aroy', '/me Started hosting www.twitch.tv/' + target);
  50. });
  51.  
  52. client.on("ban", (channel, username, reason) => {
  53. client.say("aroy", "xbn");
  54. });
  55.  
  56. client.on("emoteonly", (channel, enabled) =>{
  57. client.say("aroy", "KAPOW antonnPog");
  58. });
  59.  
  60. client.on('chat', function(channel, user, message, self) {
  61. if(message === "!test" && user.subscriber) {
  62.  
  63. client.say("aroy", "@" + user['display-name'] + " hi");
  64.  
  65. }
  66. });
  67.  
  68.  
  69.  
  70. client.on('chat', function(channel, user, message, self) {
  71. if(message === "!yes") {
  72. const list = [
  73. 'Shut up Kid',
  74. 'I am not available',
  75. 'Leave me Alone',
  76. 'Bitch what you want',
  77.  
  78.  
  79. ];
  80. const rand = [Math.floor(Math.random() * list.length)];
  81. client.say("aroy", "@" + user['display-name'] + " " + list[rand] );
  82.  
  83.  
  84.  
  85. }
  86. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement