Hello dear Community.
Right now. I am writing a small script for our server, which will kick people in regard to their Idle time. I want the script to only kick someone, if the teamspeak is almost filled. For that, I need the current amount of Users on the server. Of course I could iterate through all clients and count it myself, however, I found a neat function in the API that should do what I want to do.
https://sinusbot.github.io/scripting-docs/#teamspeakextendedserverinfo
Right here, I have the function, 'maxClients()'. However. I can not get TeamSpeakExtendedServerInfo. Because of the following problem.
This right here. Will not work. Because
Will NOT give me the TeamSpeakExtednedServerInfo Object as said in the documentation right here:
https://sinusbot.github.io/scripting-docs/#extendedts3
Instead. It returns a bool. After a bit of digging I found this little piece of information.
https://github.com/SinusBot/scripting-docs/issues/22
Which tells me that apparently this 'triggers serverinfo_int event with extended server info object'.
My question now. How can I receive my extended server info object? And I suspect the documentation here is also at fault as well then.
Thank you for reading and taking a bit of time out of your day to help me.
I'm very grateful for any answer.
Right now. I am writing a small script for our server, which will kick people in regard to their Idle time. I want the script to only kick someone, if the teamspeak is almost filled. For that, I need the current amount of Users on the server. Of course I could iterate through all clients and count it myself, however, I found a neat function in the API that should do what I want to do.
https://sinusbot.github.io/scripting-docs/#teamspeakextendedserverinfo
Right here, I have the function, 'maxClients()'. However. I can not get TeamSpeakExtendedServerInfo. Because of the following problem.
let ts3ExtendedInfo = backend.extended().requestExtendedServerInfo().clientsOnline();
This right here. Will not work. Because
backend.extended().requestExtendedServerInfo();
Will NOT give me the TeamSpeakExtednedServerInfo Object as said in the documentation right here:
https://sinusbot.github.io/scripting-docs/#extendedts3
Instead. It returns a bool. After a bit of digging I found this little piece of information.
https://github.com/SinusBot/scripting-docs/issues/22
Which tells me that apparently this 'triggers serverinfo_int event with extended server info object'.
My question now. How can I receive my extended server info object? And I suspect the documentation here is also at fault as well then.
Thank you for reading and taking a bit of time out of your day to help me.
I'm very grateful for any answer.