@twitchapis/twitch.js - v2.0.0-beta.7
    Preparing search index...

    Hierarchy

    • EventEmitter
      • Client
    Index

    Constructors

    Properties

    channels: ChannelManager
    isAnonymous: boolean
    user: null | BasicUserStructure = null

    Methods

    • Disconnects from twitch server and stop the client

      Returns Promise<void>

    • Get the REST API Manager Instance

      Returns RestManager

      [RestManager] - The REST API Manager Instance

    • Checks if a channel is currently in live

      Parameters

      • channel: string

        The channel name to check

      Returns Promise<boolean>

      • Returns true if the channel is live, false otherwise
      • If the client is not ready or the channel name is invalid
      • If the channel name includes spaces or starts with '#'
      • If there is an error while checking the channel status
    • Connects with a twitch channel chat

      Parameters

      • channel: string

        The channel name who will be connected

      Returns Promise<string>

      • Resolved when successfully connect with channel
    • Disconnects from a twitch channel chat

      Parameters

      • channel: string

        The channel name who will be disconnected

      Returns Promise<string>

      • Resolved with channel name when successfully disconnect with channel
    • Starts the step manager and log in twitch.

      Parameters

      • token: null | string = null

        The token to use for the login

      Returns Promise<void>

    • Connects in multiples twitch channels chats

      Parameters

      • channels: string[]

        The array of channels to join

      Returns Promise<string>

      • Resolved when successfully connect with channel
    • Do a ping to twitch and returns the response time in milliseconds

      Returns Promise<number>

      • The twitch response time in milliseconds
    • returns the client uptime in milliseconds

      Returns number

      the number of milliseconds since the client is ready

      const uptime = Client.uptime();