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

ClientEdit - ResponseError: invalid parameter

JDittmerCOM opened this issue · comments

Hi, when I try to change the client nickname, I keep getting the following error message.

node:internal/process/promises:246
          triggerUncaughtException(err, true /* fromPromise */);
          ^

ResponseError: invalid parameter
    at new Command (/home/Justin/MissionVBots/ts3Bot/node_modules/ts3-nodejs-library/lib/transport/Command.js:15:22)
    at /home/Justin/MissionVBots/ts3Bot/node_modules/ts3-nodejs-library/lib/transport/TeamSpeakQuery.js:79:25
    at new Promise (<anonymous>)
    at TeamSpeakQuery.handleCommand (/home/Justin/MissionVBots/ts3Bot/node_modules/ts3-nodejs-library/lib/transport/TeamSpeakQuery.js:78:16)
    at TeamSpeakQuery.execute (/home/Justin/MissionVBots/ts3Bot/node_modules/ts3-nodejs-library/lib/transport/TeamSpeakQuery.js:66:21)
    at TeamSpeak.execute (/home/Justin/MissionVBots/ts3Bot/node_modules/ts3-nodejs-library/lib/TeamSpeak.js:391:31)
    at TeamSpeak.clientEdit (/home/Justin/MissionVBots/ts3Bot/node_modules/ts3-nodejs-library/lib/TeamSpeak.js:1619:21)
    at /home/Justin/MissionVBots/ts3Bot/index.js:257:13
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {
  id: '1538',
  msg: 'invalid parameter',
  extraMsg: undefined,
  failedPermid: undefined
}

However, I have no idea what could be the reason, since all the parameters are actually there, aren't they?

app.put('/client/editname', (req, res) => {
	var identifier = req.body.identifier;
	var name = req.body.name;

	teamspeak.clientGetIds(identifier).then(clientInfo => {
		teamspeak.clientEdit(clientInfo[0].clid, {'client_nickname': name});
		res.json();
	}).catch(error => res.json({ error: "Identifier falsch oder Client nicht Online" }))
});
commented

You are not suppose to change the Client's Nickname.
Please check the Interfaces for Teamspeak.clientEdit():

export interface ClientEdit extends TeamSpeakQuery.ResponseEntry {

So I can really only use the two properties?
I was of the opinion that I read that I could also change the nickname.
But well, ok, then I know. Thanks.

clientDescription?: string
clientIsTalker?: boolean