Multivit4min / TS3-NodeJS-Library

TeamSpeak 3 Server Query Library supports SSH and RAW Query
https://multivit4min.github.io/TS3-NodeJS-Library/
MIT License
150 stars 19 forks source link

Not listening to channel messages #44

Closed chikovanreuden closed 5 years ago

chikovanreuden commented 5 years ago

Describe the bug Does not fire TeamSpeak3#textmessage. Only private Messages and Messages in the same Channels as the Bot fires the Event but not the Messages of Clients in other Channels.

To Reproduce

const TeamSpeak3 = require("ts3-nodejs-library")

const ts3 = new TeamSpeak3({
      host: "localhost",
      queryport: 10011,
      serverport: 9987,
      username: "serveradmin",
      password: "some",
      nickname: "Bot",
      keepalive: true
    })
ts3.useBySid(1, "serveradmin");

ts3.on("ready", () => {
  Promise.all([
    ts3.registerEvent("server"),
    ts3.registerEvent("channel", 0),
    ts3.registerEvent("textserver"),
    ts3.registerEvent("textchannel"),
    ts3.registerEvent("textprivate")
  ]).then(() => {
      console.log("Subscribed to all Events")
  }).catch(e => {
      console.log("CATCHED", e.message)
  })
})
ts3.on("textmessage", ev => { console.log(ev) })

Expected behavior I already read other Issues like #14 but i can not fix the this in my Script. As far as i understand, a Message in any Channel should fire TeamSpeak3#textmessage

Versions used

Additional context

Multivit4min commented 5 years ago

This is not a bug, this is a limitation of TeamSpeak itself. A query client can only see channel messages of channels where he currently is in, so its only possible to subscribe to a single channel and not to every existing channel.