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.");
});