-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.js
29 lines (27 loc) · 802 Bytes
/
app.js
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
var tmi = require('tmi.js');
var options = {
options: {
debug: true
},
connection: {
cluster: "aws",
reconnect: true
},
identity: {
username: "nakinnubis",
password: "ApiKey"
},
channels: ["omilaju"]
};
var client = new tmi.client(options);
client.connect();
client.on('connected', function(address, port) {
client.action("omilaju", "Hello welcome to our channel i am the bot and you are the human");
client.join("omilaju", "Just joined our channel");
});
client.on('chat', function(channel, user, message, self) {
if (message === '!facebook') {
client.action("omilaju", "www.facebook.com/babaagba4united");
}
client.action("omilaju", user['display-name'] + "You are welcome to our channel today");
});