Advertisement
Guest User

try2.js

a guest
Mar 9th, 2018
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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: "sgtbubble2",
  13.         password: "-"
  14.     },
  15.     channels: ["larsgolf","sgtbubble2"]
  16. };
  17.  
  18. var client = new tmi.client(options);
  19. client.connect();
  20.  
  21.  
  22. client.on("ban", function (channel, username, reason) {
  23. if (client.isMod(channel, "sgtbubble2")) {
  24.  
  25.     client = new console.log(client.getChannels());
  26.     switch (client)
  27.     {
  28.         case 1:
  29.             if (client == Sgtbubble2)
  30.             {
  31.             break;
  32.             }
  33.             else {
  34.             if (reason) !
  35.                 client.ban("sgtbubble2", username, reason).then(function(data) {
  36.                 }).catch(function(err) {
  37.             });
  38.             }
  39.             break;
  40.  
  41.             case 2:
  42.                 if (client == larsgolf)
  43.                 {
  44.                 break;
  45.                 }
  46.                 else {
  47.                 if (reason) !
  48.                     client.ban("larsgolf", username, reason).then(function(data) {
  49.                     }).catch(function(err) {
  50.                 });
  51.                 break;
  52.             };
  53.         };
  54.     };
  55.     });
  56.  
  57. client.api({
  58.     url: "https://api.twitch.tv/kraken/",
  59.     headers: {
  60.         "Client-ID": "61mhrr7puunga6edep4bzsynglycbw"
  61.     }
  62. }, function(err, res, body) {
  63.     console.log(body);
  64. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement