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

"invalid serverID" while connecting to the server

Ronak0020 opened this issue · comments

commented

Hello there! I am kinda new to this so idk what I am doing wrong but I am having issue with connecting my bot with the teamspeak server.
Whenever I try to connect without serverport, it doesn't work and when I add the serverport (serverport: 9987) it says "invalid serverID"
It worked fine in my other vps server but it is not the same in this one.

Does that mean the server port is incorrect? If so, how can I get the serverport?
Thank you. I hope I get an answer soon 😄

You can see the server port in your clients teamspeak log when you connect to the teamspeak server.
Also check that you got the correct IP Address.

commented

image
Is this the server port? 9987
If so, it is not working~ If not, then what is? @Multivit4min

Can you provide a Code with which I can try to reproduce it?

If you connect via standard telnet to that IP Address and select the port 9987 then you still receive that error, so you probably got the wrong port there

commented

Can you provide a Code with which I can try to reproduce it?

Here. Trying to make a bot for discord which logs activity from teamspeak. This is teamspeak.js file and in index.js file, I just called this function using require("./teamspeak.js")(client)

const { TeamSpeak, QueryProtocol } = require("ts3-nodejs-library");
const config = require("../config.json");

module.exports = async (client) => {
    return new TeamSpeak({
        host: "45.43.24.154",
        protocol: QueryProtocol.RAW,
        // readyTimeout: 15000,
        queryport: 10011,
        serverport: 9987,
        // username: "Ronka's admin bot",
        // nickname: "Ronka's NodeJS Bot"
    })
        .on("ready", () => {
            console.log("Connected to teamspeak");
        })
        .on("error", (error) => {
            console.log(error);
        })
        .on("clientconnect", async (joiner) => {
            if (!config.teamspeakBanned.includes(joiner.client.uniqueIdentifier)) {
                client.channels.cache.get(config.logChannel).send({
                    embeds: [client.utils.generateEmbed({
                        description: `**Member Joined**
        **User :** ${joiner.client.nickname}`
                    })]
                });
            }
            console.log(joiner);
        })
      }
commented

It isn't logging "connected to teamspeak" as well cuz it is unable to login to the server and says invalid serverID

seems alright to me, when connecting manually via a telnet software you get the same error
so you just got your serverport wrong, ask your server provider for the right port

i will close this issue as it is not an issue with the library itself

image