Advertisement
Guest User

UserColour

a guest
Nov 21st, 2017
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. let tmi = require('tmi.js');
  2.  
  3. let options = {
  4.   identity: {
  5.     username: `Username`,
  6.     password: `OAuth Token`
  7.   }
  8. }
  9.  
  10. let Client = new tmi.client(options);
  11.  
  12. Client.connect();
  13.  
  14. function loop() {
  15.   setTimeout(loop, 5000);
  16.   Client.color('#' + ['0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f'][Math.floor(Math.random()*16)] + ['0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f'][Math.floor(Math.random()*16)] + ['0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f'][Math.floor(Math.random()*16)] + ['0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f'][Math.floor(Math.random()*16)] + ['0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f'][Math.floor(Math.random()*16)] + ['0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f'][Math.floor(Math.random()*16)]);
  17. }
  18.  
  19. Client.on('connected', () => {
  20.   loop();
  21. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement