Skip to content

A NodeJS and browser friendly JavaScript library used to interact with a hackchat server

Notifications You must be signed in to change notification settings

ImDaveMa/hackchat-engine

 
 

Repository files navigation

hackchat-engine

A NodeJS and browser friendly JavaScript library used to interact with a hackchat server.

Installation

Prerequisites

Install

npm i hackchat-engine

Usage

Minimum Usage

  const { Client } = require('hackchat-engine');
  const hcClient = new Client();

  const testName = 'testBot';
  const testPass = 'testBot';
  const testChannel = 'programming';

  hcClient.on('connected', () => console.log('Connected!'));

  hcClient.on('session', (payload) => {
    console.log(payload);
    hcClient.join(testName, testPass, testChannel);
  });

  hcClient.on('channelJoined', (payload) => {
    console.log(payload);
    hcClient.say(testChannel, 'Bep boop i r bot');
  });

  hcClient.on('message', (payload) => {
    console.log(payload);
    hcClient.say(testChannel, 'No u');
  });

Advanced Usage

** Need to update this **

About

A NodeJS and browser friendly JavaScript library used to interact with a hackchat server

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%