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

@livecord/notify

Package Overview
Dependencies
Maintainers
2
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@livecord/notify

Notifier for Youtube and Twitch.

  • 1.0.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
increased by100%
Maintainers
2
Weekly downloads
 
Created
Source

@livecord/notify

Do you need my help? Visit our Discord server.

NPM Downloads License

Node Version: 16.15.0

Installation

npm i @livecord/notify --save
# or
yarn add @livecord/notify

Twitch

const { Twitch } = require('@livecord/notify');
const twitch = new Twitch({ 
    client: {
        id: 'YOUR_CLIENT_ID', // Your client ID
        token: 'YOUR_TOKEN_HERE', // https://dev.twitch.tv/docs/authentication/getting-tokens
    },
    channels: [ 'clqu_' ], // Array of channels (required)
    interval: 60000 // check channels every (optional) (default: 60000 [60 seconds])
});

twitch.on('ready', (ready) => {
    console.log('Twitch connected at: ', ready);
});

twitch.on('live', channel => {
    console.log(channel.user_name + " is live!");
});

twitch.on('offline', channel => {
    console.log(channel.user_name + " is offline!");
});
How to get Twitch Token?
const { Twitch } = require('@livecord/notify');

Twitch.getToken("CLIENT_ID", "CLIENT_SECRET").then(token => {
    console.log(token);
}).catch(err => {
    console.log(err);
})

Youtube

const { YouTube } = require('@livecord/notify');
const youtube = new YouTube({
    channels: [ '' ], // Array of channel ids (required)
    interval: 1000 // check channels every 1000ms (1 second) (optional) (default: 60000 [60 seconds])]) 
});

youtube.on('ready', (ready) => {
    console.log('Youtube connected at: ', ready);
});

youtube.on('upload', video => {
    console.log('Youtube new video!', video);
})

Developed with ❤️ by Livecord

Keywords

FAQs

Package last updated on 18 Jun 2022

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