@jourloy/twapi
v0.1.0
Published
Typescript client for Twitch API
Downloads
3
Readme
Twapi
Description
Typescript client for Twitch API
Getting started
Install
$ npm i @jourloy/twapi@latest
Usage
Import
import {Twapi} from "./twapi";
Create class
const twapi = new Twapi(Username, OAuth, [Channels]);
- Username - Username of bot
- OAuth - token with scopes
- Channels - Array of channels for join
ON
You can react on events through .twapiClient
twapi.twapiClient.on(`event`, opt => {});
Possible events
- message. Contain channel name and message text
Possible commands
- announce. Usage:
twapi.announce(channel, text)
- announceblue. Usage:
twapi.announceblue(channel, text)
- announcegreen. Usage:
twapi.announcegreen(channel, text)
- announceorange. Usage:
twapi.announceorange(channel, text)
- announcepurple. Usage:
twapi.announcepurple(channel, text)