viewing paste Unknown #26426 | Javascript

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
var tmi = require('tmi.js');
 
var options = {
        options: {
                debug: true
        },
        connection: {
                cluster: "aws",
                reconnect: true
        },
        identity: {
                username: "MinuetteBOT",
                password: "oauth:52uvx01w5v6darscol2bj511jyv13k"
        },
        channels: ["thederpysupport"]
};
 
var client = new tmi.client(options);
client.connect();
 
client.on('chat', function(channel, user, message, self) {
        if(message === "!minuette") {
                client.say("thederpysupport", "I am a Twitch Chat Bot.");
        },
        if(message === "!stop") {
                if (user["user-type"] === "mod" || user.username === channel.replace("#", "")) {
                client.disconnect();
    }
        }
});
 
client.on('connected', function(address, port) {
        console.log("Address: " , address + "Port: " + port);
        client.action("thederpysupport", "has connected.");
});
Viewed 436 times, submitted by unknown.