Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var tmi = require('tmi.js');
- var options = {
- options: {
- debug: true
- },
- connection: {
- cluster: 'aws',
- reconnect: true
- },
- identity: {
- username: 'Mattzin',
- password: 'oauth:bug7rpu1kcemimpc93o5oweesvps3f'
- },
- channels: ['MarbleRacing']
- };
- var client = new tmi.client(options);
- client.connect();
- client.on('connected', function(){
- client.say('MarbleRacing', 'Waddup!');
- });
- client.on('chat',function(channel, user, message, self){
- if(message == 'Enter marbles now!'){
- var timeOut = Math.floor(Math.random() * 6) + 1;
- var timeOutMS = timeOut * 1000;
- setTimeout(function(){
- client.say('MarbleRacing', '!marble beachball');
- }, timeOutMS);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement