Skip to content

Simple wrapper class for sending messages to chatrooms on Pokec social network.

License

Notifications You must be signed in to change notification settings

oliverfindl/pokec-send-message

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pokec-send-message

npm npm npm paypal

Simple wrapper class for sending messages to chatrooms on Pokec social network.

This package cannot send RP messages.


Install

Via npm [package]:

$ npm install pokec-send-message

Via yarn [package]:

$ yarn add pokec-send-message

Usage

// require lib
const PokecAPI = require("pokec-send-message");

// init lib
const pokec = new PokecAPI();

// get list of pokec chatrooms
pokec.getRooms().then(console.log).catch(console.error);

// login to pokec
pokec.login(
	"username",
	"password"
).then(response => {
	console.log(response);
	
	// send message
	pokec.sendMessage(
		"hello :)", // message
		9, // room id, for list of available rooms use getRooms method
		"somebody" // [optional] for user, defaults to "all"
	).then(console.log).catch(console.error);

	// set interval for ping
	setInterval(() => pokec.ping().then(console.log).catch(console.error));

}).catch(console.error);

License

MIT

About

Simple wrapper class for sending messages to chatrooms on Pokec social network.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published