Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

twitch-toolkit

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

twitch-toolkit

A set of tools to integrate with Twitch API, Twitch Chat and Twitch WebHooks.

  • 0.0.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
13
decreased by-65.79%
Maintainers
1
Weekly downloads
 
Created
Source

twitch-toolkit

License Build Status

A set of tools to integrate with Twitch API, Twitch Chat and Twitch WebHooks.

NPM

Installation

Using npm:

$ npm i --save twitch-toolkit

Usage

The library is composed by three modules:

  • api: Provides access to the Helix API.
  • chat: Provides access to the chat events through tmi.js .
  • websub: Provides access to the websubs topics and events.

You can use the toolkit just by creating a new instance with the configuration object:

const Twitch = require('twitch-toolkit');

let twitch = new Twitch(config);

The config object is described below:

AttrTypeDescription
loggerlogger objectThe logger instance.
debugBooleanA flag to enable the debug mode. Default: false
client_idStringThe Twitch.tv client ID to be used to access the services.
client_secretStringThe Twitch.tv client secret to be used to use the private services.
chatOptionsObjectThe chat configuration object
chatOptions.reconnectBooleanA flag to enable the auto-reconnect mode. Default: false
chatOptions.ignoreSelfStringA flag to ignore the bots own messages. Default: false
chatOptions.usernameStringThe bot's username.
chatOptions.passwordStringThe bot's OAuth Token. You can get it at http://twitchapps.com/tmi/
chatOptions.channelsArray[String]The list os channels the bot will join and listen.
chatOptions.chatCommandsObjectThe object with the chatCommands, described below
chatOptions.whisperCommandsObjectThe object with the whisperCommands, described below
chatOptions.wordTriggersObjectThe object with the wordTriggers, described below

API

The API module will be created with the toolkit object and can be acessed by its name:

let twitchAPI = twitch.api;

Chat

The chat module will be created with the toolkit object and can be acessed by its name:

let twitchChat = twitch.chat;

The module will be ready to use but the user won't join the chat until you explicitly connect to it:

twitch.connect();
Chat Commands
Whisper Commands
Word Triggers

WebSub

Keywords

FAQs

Package last updated on 07 Feb 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc