View Source Code

Lobbies

Create Lobby

Creates a new lobby on-demand.

Request

  • version
    string
  • region
    string
  • tags
    optional combination of empty object and record of strings
  • maxPlayers
    number
  • maxPlayersDirect
    number
  • 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.create({
  // Request body
});