Advertisement
PlanetNoob

Untitled

Mar 1st, 2019
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  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: 'no',
  13. password: 'no',
  14. },
  15. channels: ['no'],
  16. };
  17.  
  18. const client = new tmi.client(options);
  19.  
  20. client.connect();
  21.  
  22. client.on('connected', (address, port) => {
  23. client.action('no', 'Hello, Planets_Slave is now connected!');
  24. });
  25.  
  26. client.on('chat', (channel, user, message, self) => {
  27. if(message === '!about') {
  28. client.action('no', 'Planets_Slave is a bot made by Planet in Node.JS');
  29. }
  30. if(message === '!hi', '!hello') {
  31. client.action('no', `Hello ${user['display-name']}!`);
  32. }
  33. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement