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);
})