Multivit4min / TS3-NodeJS-Library

TeamSpeak 3 Server Query Library supports SSH and RAW Query

Home Page:https://multivit4min.github.io/TS3-NodeJS-Library/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Remove Server Groups

MongoVFR opened this issue · comments

So this is something Server Queries might not be able to do but I have looked through the documentation and wanted to see if this was possible. I want to remove all server groups from someone who is not connected to the teamspeak. Currently if I want to do this I have to open up the dialogue box and click on all of them individually. Would I be able to pass the TS Identity token to the function to remove all server groups?

Yes this is possible, for this you need to search the database id of the client which you can do with these functions:

  //retrieve the database id of a specific client 
  //https://multivit4min.github.io/TS3-NodeJS-Library/interfaces/types_responsetypes.clientgetdbidfromuid.html
  const client = await teamspeak.clientGetDbidFromUid("YOUR_UID_HERE=")
  //then you can just delete him from the database with 
  //https://multivit4min.github.io/TS3-NodeJS-Library/classes/teamspeak.teamspeak-2.html#clientdbdelete
  await teamspeak.clientDbDelete(client.cldbid)

Thanks! <3