Skip to content

Instantly share code, notes, and snippets.

@d0p3t
Created July 22, 2017 17:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save d0p3t/ecce0693fdad292031e01d8118c24aca to your computer and use it in GitHub Desktop.
Save d0p3t/ecce0693fdad292031e01d8118c24aca to your computer and use it in GitHub Desktop.
var tmi = require('tmi.js')
var options = {
options: {
debug: true
},
connection: {
reconnect: true
},
identity: {
username: "CoffeeBotAlpha",
password: "oauth:929l3ycvb97i729obgy47bicjc0zqe"
},
channels: ["#exoti_x"]
};
var client = new tmi.client(options);
client.connect();
client.on('connected', function(address, port) {
client.action("exoti_x", "Hello i am CoffeeBot i am currently in alpha, i love coffee and i like interacting with people, so welcome to the stream and hello.");
});
client.on('chat', function(channel, user, message, self) {
if(message === "!twitter") {
client.action(channel, "twitter.com/blankktweets");
}
if(message === "Hey") {
client.action(channel, "Hi there!");
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment