• . Create a Twitch client/connection.

    The twitch client can then listen to multiple events.

    %%{init:{"theme":"dark"}}%% graph LR twitchClient -- on --> connecting & connected & disconnected & join & message; connecting --> a["client is connecting to Twitch<br>(address, port) => {}"]; connected --> b["client is connecting to Twitch<br>(address, port) => {}"]; disconnected --> c["client was disconnected from Twitch<br>(reason) => {}"]; join --> d["client joined a channel on Twitch<br>(channel, username, self) => {}"]; message --> e["a new message is being sent in a joined Twitch channel<br>(channel, tags, message, self) => {}"];
    %%{init:{"theme":"default"}}%% graph LR twitchClient -- on --> connecting & connected & disconnected & join & message; connecting --> a["client is connecting to Twitch<br>(address, port) => {}"]; connected --> b["client is connecting to Twitch<br>(address, port) => {}"]; disconnected --> c["client was disconnected from Twitch<br>(reason) => {}"]; join --> d["client joined a channel on Twitch<br>(channel, username, self) => {}"]; message --> e["a new message is being sent in a joined Twitch channel<br>(channel, tags, message, self) => {}"];
    graph LR
      twitchClient -- on --> connecting & connected & disconnected & join & message;
      connecting --> a["client is connecting to Twitch<br>(address, port) => {}"];
      connected --> b["client is connecting to Twitch<br>(address, port) => {}"];
      disconnected --> c["client was disconnected from Twitch<br>(reason) => {}"];
      join --> d["client joined a channel on Twitch<br>(channel, username, self) => {}"];
      message --> e["a new message is being sent in a joined Twitch channel<br>(channel, tags, message, self) => {}"];

    Returns

    Twitch client.

    Parameters

    • twitchName: OrUndef<string>

      Name of the Twitch account that should be connected.

    • twitchOAuthToken: OrUndef<string>

      The authorization token to the Twitch account.

    • twitchChannels: OrUndef<readonly string[]>

      The Twitch channels that should be connected to.

    • debug: boolean = false

      Print Twitch client debug output to the console.

    • logger: Readonly<Logger>

      Logger (used for logging).

    Returns Client

Generated using TypeDoc