Open Forge-Media opened 5 years ago
I noticed you've made some updates recently so I reinstalled the bot with the latest version.
Unfortunately I'm noticing the same error as above.
Launch the bot once: npm start
and then stop the bot, then try restart it and I get:
{ id: 513, msg: 'nickname is already in use' }
Even though no user has that nickname.
For now I've solved this by the following "hack" change to launchteamspeak.js
:
function (teamspeakClient, callback) {
console.log("Using virtual server " + config.q_vserverid + " now.");
var rnum = Math.floor(Math.random() * Math.floor(1000));
teamspeakClient.send("clientupdate", {client_nickname: "FGN-Steambot"+rnum}, function (err) {
if (typeof err !== "undefined") {
callback(err);
} else {
console.log("Changed query client name.");
callback(null, teamspeakClient);
}
})
}
This avoids the error by effectively giving the bot a unique nickname every-time it connects. But it's a rather inelegant solution, and I'm not exactly sure why its required in the first place.
Interestingly I'm not noticing this issue on another bot, one I've personally created. However, in that case it's using a different Teamspeak 3 NodeJS library (TS3-NodeJS-Library), from the one used in this project (node-teamspeak)
yes broken with latest ts server version
@Bealze I've fixed this in a more elegant way than my above "hack random name" code.
You can find the code changes I've made here: 3e900e7
i have tried to download your whole archive and run it but some reason it fails to load some issue with not a package.json format?
On Sat, Apr 13, 2019 at 2:14 PM Jeremy Paton notifications@github.com wrote:
@Bealze https://github.com/Bealze I've fixed this in a more elegant way than my above "hack random name" code.
You can find the code changes I've made here: 3e900e7 https://github.com/Forge-Media/steam-ts/commit/3e900e786c015d848cd69a2b54d5b1032c24dc13
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/nikitavondel/steam-ts/issues/29#issuecomment-482856237, or mute the thread https://github.com/notifications/unsubscribe-auth/ACfSOpaEk9BDn-8jkrUshUo8sgXxFcDOks5vgh5qgaJpZM4cMB1Z .
@Bealze I suggest downloading Forge-Media's whole fork. I just tested it out and it's working fine without any errors! https://github.com/Forge-Media/steam-ts
Nickname error
I've just updated my Teamspeak 3 to version 3.7.0 I can no longer get Steam-TS to start. Each time I get the following error:
I'm currently having to rename the bot in the
launchteamspeak.js
file each time, i.e: Steam-Bot1, Steam-Bot2.This works, but only as long as the bot does not crash. As as soon as it does, and PM2 restarts it, it gets the above error that the bot's nickname is already in use.
Unfortunately, the Steam-TS bot crashes quite a lot, hence why I launch it via PM2. The cause of the crashing appears to be:
Random Crashes
Seeing the same error as above, even after the fix #9b3a358
PM2 lists this error 7 times, and also shows it's restarted the steam-ts bot 7 times, so concluding that this error is causing it to crash.