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

channelGroupClientList #103

Closed Pantoflarz closed 4 years ago

Pantoflarz commented 4 years ago

Not sure if you have this for any particular reason, but channelgroupclientlist can take 3 parameters, whereas the class only accepts 2.

channelGroupClientList(cgid?: number, cid?: number, cldbid?: number): Promise<Response.ChannelGroupClientList[]> { const properties: Record<string, any> = { cgid } if (typeof cid === "number") properties.cid = cid if (typeof cldbid === "number") properties.cldbid = cldbid if (typeof cgid === "number") properties.cgid = cgid return this.execute("channelgroupclientlist", properties).then(TeamSpeak.toArray) }

thats the way it should be because all three parameters should be settable :)

not gonna bother with github being annoying about inserting code but I hope you get what I mean.

Multivit4min commented 4 years ago

Ah yeah i see, i wanted to publish a new minor release today anyway, will add this aswell ;) to get a codeblock just simple use 3 backticks ;) "`"

Multivit4min commented 4 years ago

Published a new version 2.3.1 to npm which should have the neccessary changes in them ;)

Pantoflarz commented 4 years ago

Any particular reason why this has been again removed in the current version? All three params should be settable, yet as it stands there is an implication that the cgid is always present.

Multivit4min commented 4 years ago

It should still be in there https://github.com/Multivit4min/TS3-NodeJS-Library/blob/master/src/TeamSpeak.ts#L1375