tubechat
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

Logo

Tubechat

TubeChat is an efficient and user-friendly library for YouTube chat integration. Designed for developers and content creators, it streamlines the capture, analysis, and interaction with live chat messages.

Explore the docs »

Report Bug . Request Feature

Contributors Issues License npm version

About The Project

The TubeChat NodeJS library is a project designed to streamline YouTube chat integration for developers. By requiring only the channel name, this library simplifies the process of connecting to live chats effortlessly. When a channel goes live, TubeChat automatically establishes a connection, providing a hassle-free solution for seamless interaction with YouTube live chat. Enhance your development experience with TubeChat, making YouTube chat integration straightforward and efficient.

Getting Started

Installation

First install our library

npm install tubechat

Usage

Import the library

import { TubeChat } from 'tubechat'

instantiate the class

const tubeChat = new TubeChat()

Connect to channels

tubeChat.connect('CNNbrasil')
tubeChat.connect('LofiGirl')

Event Handling

tubeChat.on('chat_connected', (channel, videoId) => {
  console.log(`${channel} chat connected ${videoId}`)
})
tubeChat.on('chat_disconnected', (channel, videoId) => {
  console.log(`${channel} chat disconnected`, videoId)
})

tubeChat.on('message', ({ badges, channel, channelId, color, id, isMembership, isModerator, isNewMember, isOwner, isVerified, message, name, thumbnail, timestamp }) => {
  console.log(channel, name, message)
})

tubeChat.on('chat_disconnected', (channel, videoId) => {
  console.log(`${channel} chat disconnected`, videoId)
})

tubeChat.on('superchatSticker', (superchatSticker) => {})
tubeChat.on('superchat', (superchat) => {})

tubeChat.on('sub', (sub) => {})
tubeChat.on('subGift', (subGift) => {})
tubeChat.on('subgiftGroup', (subgiftGroup) => {})

tubeChat.on('userReceiveSubGift', (userReceiveSubGift) => {})

...

Additional Functions

  • disconnect Disconnects a channel

    tubeChat.disconnect('LofiGirl')
  • channelList Returns the list of connected channels

    fMonitor.channelList()

License

Distributed under the MIT License. See LICENSE for more information.

Authors

  • ZackSB - Master's degree in life - ZackSB - Built tubechat

Acknowledgements

Support:

buy me a coffe

Donate with livepix



Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.0.344latest

Version History

VersionDownloads (Last 7 Days)Published
1.0.344
1.0.20
1.0.10
1.0.00

Package Sidebar

Install

npm i tubechat

Weekly Downloads

44

Version

1.0.3

License

MIT

Unpacked Size

136 kB

Total Files

55

Last publish

Collaborators

  • zacksb