1.0.3 • Published 4 months ago

tubechat v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

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

1.0.3

4 months ago

1.0.2

4 months ago

1.0.1

4 months ago

1.0.0

4 months ago