Skip to content
This repository has been archived by the owner on Sep 7, 2022. It is now read-only.

Simple Twitch Chat Client for Browser and Node.js

License

Notifications You must be signed in to change notification settings

honeykingdom/twitch-simple-irc

Repository files navigation

Twitch Simple IRC

Simple Twitch Chat Client

Getting Started

# .npmrc
@honeykingdom:registry=https://npm.pkg.github.com

npm install @honeykingdom/twitch-simple-irc

yarn add @honeykingdom/twitch-simple-irc

Basic Usage

import twitchIrc from 'twitch-simple-irc';

const main = async () => {
  const client = twitchIrc.Client.create({
    name: 'username',
    auth: 'authToken',
    connection: {
      type: 'ws', // or 'tcp'
      secure: true,
      reconnect: true,
    },
  });

  client.on('message', (data) => {
    console.log(data);
  });

  try {
    await client.connect();
  } catch (error) {
    console.log(error);
  }

  await client.join('forsen');

  client.say('Hello world!');
};

main();

About

Simple Twitch Chat Client for Browser and Node.js

Topics

Resources

License

Stars

Watchers

Forks

Packages