2.1.0 • Published 4 years ago

bombparty v2.1.0

Weekly downloads
-
License
ISC
Repository
-
Last release
4 years ago

Installation

npm i bombparty

Afterwards, get into the doc directory to look into the API Reference.

Example

const BombParty = require('bombparty')

const client    = new BombParty()
// It will connect to a guest account
// Please use:
//   new BombParty({ secret: 'NuclearHub.sid COOKIE HERE!' })
// in order to use a real user account

client.on('room', function(room) {
  room.say('Namasté!')

  // Triggered on commands, check API Reference for more info.
  room.on('command', function(user, command) {
    room.say(`Command from ${user.name}: ${command}`)
  })

  // Triggered once a player is required to play.
  room.on('game.turn', function(player) {
    room.say(`You need to play, ${player.name}!`)
  })
})

client.join('chipolata')
// This will join the room 'chipolata'
2.1.0

4 years ago

2.0.3

4 years ago

2.0.2

4 years ago

2.0.1

4 years ago

1.0.91

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago