Skip to content

Kequc/kequtwitch

Repository files navigation

Home

This library is agnostic to the information is receives from Twitch, it delivers you all data in a simple format without any frills. It requires a small amount of effort to produce the behaviour you want compared to similar libraries but it is ultimately still pretty easy honestly.

Installation

This library is available on NPM. Make sure you have Node installed and create a new project, then install the kequtwitch module.

npm install --save kequtwitch

Usage

In your project require kequtwitch at the top.

const Twitch = require('kequtwitch');

Create an instance of kequtwitch passing a valid OAuth token as the first parameter.

const twitch = new Twitch('your-oauth-token');

You are now set up to use the library! If you are on the website please view the sidebar on the right or use Github for further documentation.

Quick start

The easiest way to see the library working is to login to a chatroom. A streamer's channel is their username prepended with # in lowercase.

const Twitch = require('kequtwitch');
const twitch = new Twitch('your-oauth-token');

(async function init () {
    await twitch.chat.connect();
    await twitch.chat.join('#channel');
})();

Chat activity will appear in your console.

About

This is a node library for interfacing with twitch

Resources

License

Stars

Watchers

Forks