Advertisement
Wa1d3R

Untitled

Jul 1st, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.14 KB | None | 0 0
  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: "WaiderBOT",
  14. password: "a1a2a3a4a5"
  15. },
  16. channels: ["majkkyna"]
  17. };
  18.  
  19.  
  20. var client = new tmi.client(options);
  21. client.connect();
  22.  
  23. client.on('chat', function (channel, user, message, self) {
  24.  
  25. }
  26.  
  27. });
  28. client.on("clearchat", function (channel) {
  29. client.action(channel,"Chat byl vymazan moderatorem!");
  30. client.say(channel,"1. Kappa :D")
  31. });
  32.  
  33. client.on("ban", function (channel, username, reason) {
  34.  
  35. if(reason != null){
  36. client.action(channel,"Uzivatel "+username+" byl zabanovan! Duvod: "+reason);
  37. }else{
  38. client.action(channel,"Uzivatel "+username+" byl zabanovan!");
  39. }
  40.  
  41. });
  42. client.on("action", function (channel, userstate, message, self) {
  43. // Don't listen to my own messages..
  44. if (self) return;
  45.  
  46. }
  47. });
  48.  
  49. client.on("timeout", function (channel, username, reason, duration) {
  50. if(reason != null){
  51. client.action(channel,username+" byl docasne zabanovan na "+duration+" sekund za: "+reason);
  52. client.whisper(username,"Byl jsi docasne zabanovan na "+duration+" sekund za: "+reason);
  53. }else{
  54. client.action(channel,username+" byl docasne zabanovan na "+duration+" sekund.");
  55. client.whisper(username,"Byl jsi docasne zabanovan na "+duration+" sekund.");
  56. }
  57. });
  58.  
  59. client.on('connected', function(adress,port) {
  60. console.log("ChatControler by nicprohubeny byl uspesne nacten!");
  61. console.log("pripojeno: "+adress+":"+port);
  62. })
  63. client.on("join", function (channel, username, self) {
  64. if(username != "WaiderBOT"){
  65. console.log("Vitej "+username+ " na streamu!");
  66. }else console.log(channel,"Byl jsem spusten!");
  67.  
  68.  
  69. });
  70.  
  71. client.on("subscription", function (channel, username, method, message, userstate) {
  72. client.acion(channel,username+" dal subscribe! DEKUJEME!");
  73. });
  74.  
  75. client.on("cheer", function (channel, userstate, message) {
  76. client.say(channel,":o :o OMG! "+userstate.username+" poslal cheer! ;) Zprava: "+message);
  77. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement