1.0.0 • Published 1 year ago

twitcheventsub.js v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

TwitcEventSub

Libary for managing twitch eventsub via websocket

Usage

import { EventSub, events } from "twitcheventsub.js";

// creating instance
const sub = new EventSub({
  auth: "YOUR_AUTHENTICATION_KEY",
});

// creating event handler
const followEvent = new events.ChannelFollow("BROADCASTER", (e) => {
  console.log("event listener", e);
});

// push event to EventSub instance
sub.subscribe(followEvent);

try {
  // start your instance
  void sub.startAsync();
} catch (e) {
  console.error(e);
}

// append extra listeners
followEvent.addEventListener(() => {
  console.log("event listener 2");
});
1.0.0

1 year ago

0.2.0-test

1 year ago

0.1.1-test

1 year ago

0.1.0-test

1 year ago