Advertisement
Guest User

Untitled

a guest
Mar 6th, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const TMI = require('tmi.js')
  2.  
  3. const options = {
  4.   options: {
  5.     debug: true
  6.   },
  7.   connection: {
  8.     cluster: "aws",
  9.     reconnect: true
  10.   },
  11.   identity: {
  12.     username: "Coxyca",
  13.     password: "XXXXXX"
  14.   },
  15.   channels: ["iluvatar42"]
  16. }
  17.  
  18. const TMI_Client = new TMI.client(options)
  19.  
  20. TMI_Client.connect()
  21.  
  22. TMI_Client.on("connected", function(address, port) {
  23.   // TMI_Client.action()
  24. })
  25.  
  26. TMI_Client.on("chat", function(channel, user, message) {
  27.  
  28.   if (message === "!wr") {
  29.     TMI_Client.say(options.channels[0], "WR : 1:03:47 par nedeahS.")
  30.   }
  31.  
  32.   if (message === "!chouchou") {
  33.     TMI_Client.say(options.channels[0], "Fainger.")
  34.   }
  35.  
  36. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement