Events - Skincrib/skincrib-client GitHub Wiki

@skincrib/skincrib-client will emit specific events when necessary.

Example:

market.on('connected', (message)=>{
  console.log(message);
});

connected

connected is emitted whenever the module has been connected to the websocket server.

disconnected

disconnected is emitted whenever the module has been disconnected from the websocket server.

error

error is emitted whenever the module receives an error from the websocket server. (Such as ratelimits)

authenticated

authenticated is emitted whenever the module has been authenticated to the websocket server.

listing.added

listing.added is emitted whenever the module receives a new listing from the market.

listing.removed

listing.removed is emitted whenever the module receives that a listing has been removed from the market.

listing.status

listing.status is emitted whenever the module receives that one of your listings has a status update.