View Source Code

Lobbies

Join Lobby

Add a player to an existing lobby.

Request

  • lobbyId
    string
  • players
    array of empty objects
  • noWait
    optional boolean

Response

  • lobby
    object
    • lobby.id
      string
    • lobby.version
      string
    • lobby.tags
      combination of empty object and record of strings
    • lobby.createdAt
      number
    • lobby.readyAt
      optional number
    • lobby.players
      number
    • lobby.maxPlayers
      number
    • lobby.maxPlayersDirect
      number
    • lobby.backend
      union of objects
        • lobby.backend.test
          empty object
        • lobby.backend.localDevelopment
          object
          • lobby.backend.localDevelopment.ports
            combination of empty object and record of objects
        • lobby.backend.server
          object
          • lobby.backend.server.serverId
            string
          • lobby.backend.server.ports
            optional combination of empty object and record of objects
  • players
    array of objects
    • players.token
      string
    • players.id
      string

Usage

1. Install the module

2. Use this script

const data = await ctx.modules.lobbies.join({
  // Request body
});