Getting started
Installation
To add EventSub support to your project, you need three packages:
twitch-auth
, the authentication coretwitch
, the API clienttwitch-eventsub
, the actual EventSub listener
To install these, just execute:
yarn add twitch twitch-auth twitch-eventsub
or using npm:
npm install twitch twitch-auth twitch-eventsub
Importing the library
Using ES2015 modules:
import { EventSubListener } from 'twitch-eventsub';
Using CommonJS:
const { EventSubListener } = require('twitch-eventsub');