Advertisement
Guest User

Untitled

a guest
Apr 24th, 2016
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. var tmi = require ('tmi.js');
  2.  
  3. var options = {
  4. options: {
  5. debug: true
  6. },
  7. connection: {
  8. cluster: "aws",
  9. reconnect: true
  10. },
  11. identity: {
  12. // Bot username
  13. username: "COYGbot",
  14. // Twitch Chat OAuth Password
  15. password: "oauth:n75pg2fphmd18y27tiqfyxhngzx9hv"
  16. },
  17. // Channel username
  18. channels: ["wiktoroman"]
  19. };
  20.  
  21. var client = new tmi.client(options);
  22. client.connect();
  23.  
  24. client.on('connected', function (address, port){
  25. // Connected to server
  26. });
  27.  
  28. client.on('hat', function(channel, user, message, self) {
  29. if(message === "!ålder")
  30. client.action("wiktoroman", "Wiktor är född 2000")
  31. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement