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 20 forks source link

Problem with sending messages trought server query #170

Closed ghost closed 3 years ago

ghost commented 3 years ago

Describe the bug Message() method probably doesnt work (message doesn't appear for target)

To Reproduce const target = await client.getClientByUid("jHK6yg+kdEa1C1tNg4thosxvmhE="); target.message("test message") // doesn't drop any errors but message doesn't appear for message target

Versions used

Additional context Probably i'm doing something wrong. if yes, correct me.

Multivit4min commented 3 years ago

try to await the message method, depending on your node configuration it might drop the error silently

try {
  const target = await client.getClientByUid("jHK6yg+kdEa1C1tNg4thosxvmhE=");
  await target.message("test message")
} catch (e) {
  console.log(e)
  throw e
}

Edit: Also as a note getClientByUid might return undefined if the client with given uid has not been found

ghost commented 3 years ago

i tried this code but it still doesn't drop any errors and don't send message to target.(i checked is target is undefinied and it isn't).

Edit: I note poke don't work too but kickfromserver is working

ghost commented 3 years ago

Its probably ts3 issue because when i try to poke or send message with yatqa i dont see it too

Multivit4min commented 3 years ago

do you by any chance have created a teamspeak query bot with the uid the client is requesting? Maybe it gets sent to the other client with the same uid.

What TeamSpeak Server Version are you using?

chikovanreuden commented 3 years ago

@Fovex Additionally you could add those, if you haven't already:

client.on("textmessage", ev => {
    console.dir(event);
});

client.on('error', event => {
    console.dir(event);
});

client.on("debug", event => {
    console.dir(event);
});
ghost commented 3 years ago

do you by any chance have created a teamspeak query bot with the uid the client is requesting? Maybe it gets sent to the other client with the same uid.

What TeamSpeak Server Version are you using?

I AM using serverquery super user (serveradmin)

My teamspeak server version is Linux 3.13.6 (09.06.2021 12:22:37)

ghost commented 3 years ago

its look like serverquery bug in this teamspeak 3 server version. I hosted new teamspeak 3 server on my windows (same version as on my vps) and sending messages with serverquery don't work too. Can anyone else test it on own computer ?

edit: probably they change or broke something with server query API?

ghost commented 3 years ago

I discovered it's probably my teamspeak 3 client problem. Thank you for all help and have a good day/night etc.