How to use the twitch-js.Client function in twitch-js

To help you get started, we’ve selected a few twitch-js examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mccxiv / tc / src / tc-renderer / ng / providers / irc.js View on Github external
'subscribers',
      'subscription',
      'subgift',
      'timeout',
      'unhost',
      'whisper'
    ]

    const clientSettings = {
      options: {debug: false, clientId: CLIENT_ID},
      connection: {timeout: 20000, reconnect: true, secure: true},
      identity: angular.copy(settings.identity),
      channels: []
    }

    client = new Client(clientSettings)
    client.connect()
    client.on('connected', joinChannels)
    onBadLogin(destroy)
    forwardEvents(client, ee, events)

    client.on('connected', () => {
      ee.ready = true
      setTimeout(() => $rootScope.$apply(), 0)
    })

    // Disconnected event gets spammed on every connection
    // attempt. This is not ok if the internet is temporarily
    // down, for example.
    onlyEmitDisconnectedOnce()

    function onlyEmitDisconnectedOnce () {

twitch-js

Javascript library for the Twitch Messaging Interface.

MIT
Latest version published 2 years ago

Package Health Score

53 / 100
Full package analysis