Skip to content

xbenjii/so-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sobot

Instructions

Install

npm install so-chat-client

Run

import { Client } from 'so-chat-client';

(async () => {
	const client = new Client({
		email: '[email protected]',
		password: 'foobar',
		mainRoom: 17
	});

	client.once('open', () => console.log('Connected'));
	client.once('close', () => console.log('Connection closed'));
	client.on('error', error => console.error(error));
	client.on('event', event => console.log(event));
	client.on('debug', message => console.log(message));

	try {
		await client.auth(); // Authenticates with SO and sets up the client
		await client.join(); // If you don't pass an ID, it will join the room you passed into the config
	} catch (error) {
		console.error(error);
	}
})();

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •