Function findPlayer

  • Finds a player on the master server by their name or clan.

    Parameters

    • value: string

      The value for search for.

    • kind: "name" | "clan" = 'name'

      The kind of search to use.

      "name"
      

    Returns Promise<MasterSrvFoundPlayer[] | null>

    const players = await findPlayer('nameless tee');

    if (players === null) {
    console.log('Player not found.');
    } else {
    console.log(`Found ${players.length} player${players.length > 1 ? 's' : ''}:\n${players.map(p => `${p.server.name} | ${p.server.addresses[0].split('//')[1]} | ${p.name} [${p.clan}]`).join('\n')}`);
    }