JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q38942F
  • License MIT

Interface with the twitch api

Package Exports

  • twitch.tvjs
  • twitch.tvjs/esm

Readme

Twitch.tvjs

Interface with the twitch api

Install

npm install twitch.tvjs

Documentation

Example usage

const twitch = require('twitch.tvjs');
const client = new twitch.Client({
  channels: ['channel1', 'channel2'],
});

client.on('ready', () => {
  console.log(`${client.user.username} Ready`);
});

client.on('chat', (message) => {
  if (message.self) return;
  if (message.content === 'hello') {
    message.channel.send('hello there :)');
  }
});

client.login('<username>', 'oauth:<password>');