buckswolf Posted December 19, 2023 Report Posted December 19, 2023 Hello first of all, unfortunately I don't know much about software, I have a bot and I get this error when I try to run it, I tried changing the ip address as a solution to the error but it didn't work. It worked the first time I used another account, but after 2-3 restarts I started getting the same error again, where is the error? "use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const steam_user_1 = __importDefault(require("steam-user")); const steam_totp_1 = __importDefault(require("steam-totp")); const steamcommunity_1 = __importDefault(require("steamcommunity")); const steam_tradeoffer_manager_1 = __importDefault(require("steam-tradeoffer-manager")); const message_helper_1 = require("./helpers/message.helper"); const friendship_helper_1 = require("./helpers/friendship.helper"); const crypto_helper_1 = require("./helpers/crypto.helper"); // dotenv setup const dotenv_1 = __importDefault(require("dotenv")); const order_helper_1 = require("./helpers/order.helper"); dotenv_1.default.config(); // Don't stop if ERROR! process.on('uncaughtException', function (err) { console.error(err); console.log("Node NOT Exiting..."); }); const client = new steam_user_1.default(); const community = new steamcommunity_1.default(); const manager = new steam_tradeoffer_manager_1.default({ steam: client, community: community, domain: 'localhost', // your domain name language: 'en', // language code (optional) }); const username = process.env.BOT_USERNAME; const password = process.env.BOT_PASSWORD; const sharedSecret = process.env.BOT_SHARED_SECRET; const authCode = steam_totp_1.default.generateAuthCode(sharedSecret); client.logOn({ accountName: username, password: password, twoFactorCode: authCode, }); client.on('webSession', (sessionID, cookies) => { community.setCookies(cookies); manager.setCookies(cookies, function (err) { if (err) { console.log("set Cookies", err); // process.exit(1); // Fatal error since we couldn't get our API key return; } }); }); community.on('sessionExpired', (err) => { console.log('Session expired'); if (err) { console.log(err); } if (!client.steamID) client.webLogOn(); }); client.on('disconnected', (err) => { console.error('Disconnected from Steam:', err); if (!client.steamID) 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.