Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var tmi = require('tmi.js');
- var options = {
- options: {
- debug: true
- },
- connection: {
- cluster: "aws",
- reconnect: true
- },
- identity: {
- username: "sgtbubble2",
- password: "-"
- },
- channels: ["larsgolf","sgtbubble2"]
- };
- var client = new tmi.client(options);
- client.connect();
- client.on("ban", function (channel, username, reason) {
- if (client.isMod(channel, "sgtbubble2")) {
- client = new console.log(client.getChannels());
- switch (client)
- {
- case 1:
- if (client == Sgtbubble2)
- {
- break;
- }
- else {
- if (reason) !
- client.ban("sgtbubble2", username, reason).then(function(data) {
- }).catch(function(err) {
- });
- }
- break;
- case 2:
- if (client == larsgolf)
- {
- break;
- }
- else {
- if (reason) !
- client.ban("larsgolf", username, reason).then(function(data) {
- }).catch(function(err) {
- });
- break;
- };
- };
- };
- });
- client.api({
- url: "https://api.twitch.tv/kraken/",
- headers: {
- "Client-ID": "61mhrr7puunga6edep4bzsynglycbw"
- }
- }, function(err, res, body) {
- console.log(body);
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement