Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var tmi = require('tmi.js');
- var _ = require('underscore');
- var oauth = require('./oauth.js');
- var req = require('ajax-request');
- var sleep = require('sleep');
- var options = {
- options: {
- debug: true
- },
- connection: {
- cluster: "aws",
- reconnect: true,
- secure: true
- },
- identity: {
- username: "fairubot",
- password: oauth.passwdbot
- },
- channels: ["teamfortresstv"]
- };
- var client = new tmi.client(options);
- client.connect();
- function randomA(max) {
- return Math.floor(Math.random() * max);
- }
- client.on("timeout", function(channel, username, reason, duration){
- switch(randomA(6)){
- case 1:
- client.say(channel,"lol see ya " + username);
- break;
- case 2:
- client.say(channel,"whoa watch your language " + username);
- break;
- case 3:
- client.say(channel,"byebye " + username);
- break;
- case 4:
- client.say(channel,"cu in " +duration+"sek " + username);
- break;
- case 5:
- client.say(channel,"xd "+username+" nice job...");
- break;
- case 6:
- client.say(channel, "SMOrc has spoken to you "+username);
- break;
- }
- sleep.sleep(5);
- });
- client.on("ban", function(channel, username, reason){
- switch(randomA(4)){
- case 1:
- client.say(channel,"lol see ya " + username);
- break;
- case 2:
- client.say(channel,"whoa get banned " + username);
- break;
- case 3:
- client.say(channel,"bb " + username);
- break;
- case 4:
- client.say(channel,"see the SMOrc hammer "+username);
- break;
- }
- sleep.sleep(5);
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement