Advertisement
Guest User

Untitled

a guest
Oct 2nd, 2016
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 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. username: 'Mattzin',
  13. password: 'oauth:bug7rpu1kcemimpc93o5oweesvps3f'
  14. },
  15. channels: ['MarbleRacing']
  16. };
  17.  
  18. var client = new tmi.client(options);
  19. client.connect();
  20. client.on('connected', function(){
  21. client.say('MarbleRacing', 'Waddup!');
  22. });
  23. client.on('chat',function(channel, user, message, self){
  24. if(message == 'Enter marbles now!'){
  25. var timeOut = Math.floor(Math.random() * 6) + 1;
  26. var timeOutMS = timeOut * 1000;
  27. setTimeout(function(){
  28. client.say('MarbleRacing', '!marble beachball');
  29. }, timeOutMS);
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement