to explain this a bit further:
you can use
to get the first element of the array which is sufficient if your script is designed for TS3 only.
But as soon as you want to support Discord, then you should use the
which will always return only one channel, which is the currently used Audio Channel.
This will always be the same channel as
if used in the TeamSpeak backend, but on Discord it might give you another channel, since Discord supports multiply channels (Audio + Text channels)
So in general the
should be safer.
Also see:
https://sinusbot.github.io/scripting-docs/#clientgetchannels and
https://sinusbot.github.io/scripting-docs/#clientgetaudiochannel for more about this and further documentation.