Closed BenediktBertsch closed 5 years ago
Can you send me code to reproduce? Invalid serverID occurs when you send for example the clientlist command without selecting a server
Hey @Multivit4min,
the whole Code is in my Repository (https://github.com/BenediktBertsch/Micro_TeamSpeak_Bot)
Thank you.
The CI tests also connects to a docker environment and this works without any problems https://github.com/Multivit4min/TS3-NodeJS-Library/blob/master/test/integration.js#L62
And to be honest i have never run a NodeJS app inside a docker container yet but you could listen to the debug event and just log everything to see what gets sent to the teamspeak server and what the query receives back from the ts3 server
ts3.on("debug", console.log)
as far as I can tell the error gets logged here https://github.com/BenediktBertsch/Micro_TeamSpeak_Bot/blob/master/index.js#L96
so i can only assume that no teamspeak server has been selected
EDIT: I guess i found it https://github.com/Multivit4min/TS3-NodeJS-Library/blob/master/src/TeamSpeak3.js#L225 I check for a serverport with typeof number but all environment variables are being interpreted as string
so when connecting to the TeamSpeak Server please use
const ts3 = new teamspeak({
host: process.env.TShost,
queryport: parseInt(process.env.TSqueryport, 10),
serverport: parseInt(process.env.TSserverport, 10),
username: process.env.TSqueryusername,
password: process.env.TSquerypassword,
nickname: process.env.TSnickname,
keepalive: config.bot.settings.keepalive
})
Hey,
I tested it in debugging and tried to figure it out and then tried your idea, and it works now. Thank you!
Describe the bug Docker Container cant start: Output
Versions used
Additional context Local does the program work with hardcoded settings. With Docker environment settings it doesnt work.
Thank you for the amazing library.