Remove Server Groups
MongoVFR opened this issue · comments
Aidan deBruyne commented
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?
David Kartnaller commented
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)
Aidan deBruyne commented
Thanks! <3