🚀 Big News:Socket Has Acquired Secure Annex.Learn More →
Socket
Book a DemoSign in
Socket

so-chat-client

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

so-chat-client

StackOverflow chat client

latest
npmnpm
Version
0.0.2
Version published
Maintainers
1
Created
Source

sobot

Instructions

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

(async () => {
	const client = new Client({
		email: 'foo@bar.com',
		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);
	}
})();

FAQs

Package last updated on 08 Jan 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts