@jourloy/twapi

0.1.0 • Public • Published

Twapi

NotReady

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)

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.1.00latest

Version History

VersionDownloads (Last 7 Days)Published
0.1.00

Package Sidebar

Install

npm i @jourloy/twapi

Weekly Downloads

0

Version

0.1.0

License

MIT

Unpacked Size

26.5 kB

Total Files

10

Last publish

Collaborators

  • jourloy