🪖
Squad Client
  • 🏠Home
    • ⬇️Installation & Sample
    • 🏷️Releases
  • 🔵Methods
  • 🟢Events
Powered by GitBook
On this page
  1. 🏠Home

⬇️Installation & Sample

PreviousHomeNextMethods

Last updated 1 year ago

CtrlK
npm install squadclient
yarn add squadclient
pnpm add squadclient
import { SquadClient } from 'squadclient';
// For CommonJS -> const { SquadClient } = require('squadclient');

const client = new SquadClient({ host: 'serverIp', port: rconPort, password: 'rconPassword' });

(async () => {
await client.connect();
const info = await client.getServerInfo();
console.log(info);
client.on('squadCreate', (squad) => {
console.log('A squad has been created!', `Squad Name: ${squad.squadName} | Team Name: ${squad.teamName}`);
});
})();