Multivit4min / TS3-NodeJS-Library

TeamSpeak 3 Server Query Library supports SSH and RAW Query
https://multivit4min.github.io/TS3-NodeJS-Library/
MIT License
149 stars 18 forks source link

backend question #145

Closed Maurice037 closed 3 years ago

Maurice037 commented 3 years ago

Hello i have import the Library in my backend an have build me this cod

router.get('/test', function(req, res, next) {
  (async () => {
      const clients = await ts3.clientList({ clientType: 0 })
      const Clients = [];
      clients.forEach( client => Clients.push(client));
      res.json(Clients);

  })
  ()

});

this ist my output

[{"clid":"80","cid":"4",.....

It's worked but how i can grab the nickname. when i make res.json(Clients.nickname) i become a blank site

Multivit4min commented 3 years ago

if you want to get the first nickname in the array use Client[0].nickname

please for general questions use stackoverflow.com or our official discord and only create github issues with issues of the library itself