Anura Posted November 30, 2020 Report Posted November 30, 2020 Can someone help me why i get this error if i want to logOn on 3 accounts with delay? The first accounts logs in normally but the second and the third says that they are already logged on: (node:5748) UnhandledPromiseRejectionWarning: Error: Already logged on, cannot log on again at C:\Users\user1\AppData\Roaming\npm\node_modules\steam-user\components\logon.js:23:10 at processTicksAndRejections (internal/process/task_queues.js:75:11) (Use `node --trace-warnings ...` to show where the warning was created) (node:5748) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1) (node:5748) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. Object.keys(logininfo).forEach((k, i) => { setTimeout(() => { var logOnOptions = { accountName: logininfo[k][0], password: logininfo[k][1], promptSteamGuardCode: false }; try { bot.logOn(logOnOptions, i); } catch (error) { console.log(error) } }, 5000 * i); }) Quote
neverhood Posted November 30, 2020 Report Posted November 30, 2020 you need new instance of steam-user (bot in this case) for each account Anura 1 Quote
Anura Posted November 30, 2020 Author Report Posted November 30, 2020 46 minutes ago, neverhood said: you need new instance of steam-user (bot in this case) for each account Okay got it work now thanks! But i got one more question how can i logOff a specific instance? Quote
neverhood Posted November 30, 2020 Report Posted November 30, 2020 bot.logOff(); for example or bot._disconnect(true); Quote
Dr. McKay Posted December 1, 2020 Report Posted December 1, 2020 4 hours ago, neverhood said: bot.logOff(); for example or bot._disconnect(true); Do not use prefix-underscored methods. They are internal to the module and could change at any time. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.