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: {
- reconnect: true
- },
- identity: {
- username: "WaiderBOT",
- password: "a1a2a3a4a5"
- },
- channels: ["majkkyna"]
- };
- var client = new tmi.client(options);
- client.connect();
- client.on('chat', function (channel, user, message, self) {
- }
- });
- client.on("clearchat", function (channel) {
- client.action(channel,"Chat byl vymazan moderatorem!");
- client.say(channel,"1. Kappa :D")
- });
- client.on("ban", function (channel, username, reason) {
- if(reason != null){
- client.action(channel,"Uzivatel "+username+" byl zabanovan! Duvod: "+reason);
- }else{
- client.action(channel,"Uzivatel "+username+" byl zabanovan!");
- }
- });
- client.on("action", function (channel, userstate, message, self) {
- // Don't listen to my own messages..
- if (self) return;
- }
- });
- client.on("timeout", function (channel, username, reason, duration) {
- if(reason != null){
- client.action(channel,username+" byl docasne zabanovan na "+duration+" sekund za: "+reason);
- client.whisper(username,"Byl jsi docasne zabanovan na "+duration+" sekund za: "+reason);
- }else{
- client.action(channel,username+" byl docasne zabanovan na "+duration+" sekund.");
- client.whisper(username,"Byl jsi docasne zabanovan na "+duration+" sekund.");
- }
- });
- client.on('connected', function(adress,port) {
- console.log("ChatControler by nicprohubeny byl uspesne nacten!");
- console.log("pripojeno: "+adress+":"+port);
- })
- client.on("join", function (channel, username, self) {
- if(username != "WaiderBOT"){
- console.log("Vitej "+username+ " na streamu!");
- }else console.log(channel,"Byl jsem spusten!");
- });
- client.on("subscription", function (channel, username, method, message, userstate) {
- client.acion(channel,username+" dal subscribe! DEKUJEME!");
- });
- client.on("cheer", function (channel, userstate, message) {
- client.say(channel,":o :o OMG! "+userstate.username+" poslal cheer! ;) Zprava: "+message);
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement