1.0.1 • Published 3 years ago

twitch-channel v1.0.1

Weekly downloads
4
License
ISC
Repository
github
Last release
3 years ago

twitch-channel

A small library to listen to various events that can happen on a twitch channel (chat messages, raids, follows, subscriptions…)

This library acts as a layer on top of various twitch APIs (currently: IRC and EventSub) so you only have to interact with a single EventEmitter that emits uniform events.

The event objects are kept simple and without surprises.

Full documentation: https://thomaslule.github.io/twitch-channel/classes/TwitchChannel.html

import { TwitchChannel } from "twitch-channel";

const channel = new TwitchChannel({
  channel: "your_channel",
  clientId: "your_app_id",
  clientSecret: "your_app_secret",
});

channel.on("sub-gift-received", ({ gifterName, recipientName }) => {
  console.log(`${gifterName} just subgifted ${recipientName}`);
});
channel.on("log", ({ level, message, error }) => {
  console.log(`[${level}] ${message}`, error);
});

await channel.connect();
1.0.1

3 years ago

1.0.0

3 years ago

1.0.0-next.1

3 years ago

1.0.0-next.2

3 years ago

1.0.0-next.3

3 years ago

1.0.0-next.4

3 years ago

0.4.6

4 years ago

0.4.5

5 years ago

0.4.4

5 years ago

0.4.3

5 years ago

0.4.2

5 years ago

0.4.1

6 years ago

0.4.0

6 years ago

0.3.2

6 years ago

0.3.1

7 years ago

0.3.0

7 years ago

0.2.5

7 years ago

0.2.4

7 years ago

0.2.3

7 years ago

0.2.2

7 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago