Facebook
From danger, 1 Month ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 46
  1. const TwitchBot = require('./lib/bot')
  2.  
  3. const Bot = new TwitchBot({
  4.   username: 'Kappa_Bot',
  5.   oauth: 'oauth:dwiaj91j1KKona9j9d1420',
  6.   channels: ['twitch']
  7. })
  8.  
  9. Bot.on('join', channel => {
  10.   console.log(`Joined channel: ${channel}`)
  11. })
  12.  
  13. Bot.on('error', err => {
  14.   console.log(err)
  15. })
  16.  
  17. Bot.on('message', chatter => {
  18.   if(chatter.message === '!test') {
  19.     Bot.say('Command executed! PogChamp')
  20.   }
  21. })
  22.