Advertisement
Guest User

Untitled

a guest
Jun 30th, 2017
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var tmi = require('tmi.js');
  2.  
  3.  
  4.  
  5. var options = {
  6.     options: {
  7.         debug: true
  8.     },
  9.     connection: {
  10.         reconnect: true
  11.     },
  12.     identity: {
  13.         username: "dulezite",
  14.         password: "oauth:fag5yikmqisa3q8hfvn6wv7n7fem4r"
  15.     },
  16.     channels: ["fattypillow","elzic19","majkelgo","dulezite","nicprohubeny2","cyagonize","grolldir","will__x","majkkyna"]
  17. };
  18.  
  19.  
  20. var client = new tmi.client(options);
  21. client.connect();
  22.  
  23. client.on("join", function (channel, username, self) {
  24.     if(username != "Dulezite"){
  25.         client.whisper(username,"Ahoj! Promin, ze rusim! Dej prosim follow na kanal prostehyklik! Dekuju!");
  26.     }else console.log("Pripojeno.");
  27.  
  28.  
  29. });
  30.  
  31. client.on('chat', function (channel, user, message, self) {
  32.  
  33.     if(message == "!test"){
  34.         client.whisper(user.username,"Ahoj! Promin, ze rusim! Dej prosim follow na kanal prostehyklik! Dekuju!");
  35.     }else  if(message == "!tynus"){
  36.         client.say(channel, "Gennia 2017: Nemam je umely!");
  37.     }else if(message == "!cyagonize"){
  38.         client.say(channel, "Cyagonize je typek! <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 ");
  39.     }
  40. });
  41.  
  42. client.on("timeout", function (channel, username, reason, duration) {
  43.     client.say(channel,username+" byl docasne zabanovan na "+duration+" sekund za: "+reason);
  44.     client.whisper(username,"Byl jsi docasne zabanovan na "+duration+" sekund za: "+reason);
  45. });
  46.  
  47. client.on("ban", function (channel, username, reason) {
  48.  
  49.     if(reason != null){
  50.         client.say(channel,"Uzivatel "+username+" byl zabanovan! Duvod: "+reason);
  51.     }else{
  52.         client.say(channel,"Uzivatel "+username+" byl zabanovan!");
  53.     }
  54.  
  55.  
  56. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement