Created
July 22, 2017 17:49
-
-
Save d0p3t/ecce0693fdad292031e01d8118c24aca to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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