Jump to content
McKay Development

Search the Community

Showing results for tags 'question'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • News & Announcements
    • Releases & Updates
  • Help & Support
    • General
    • Guides
    • node-steam-user
    • node-steamcommunity
    • node-steam-tradeoffer-manager
    • node-steam-session

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Skype


Location


Interests

  1. So, I don't know if this is the right section for this thread, but it is tied to steamcommunity... Basically, I'm not using node-steamcommunity because I almost completely developed my app (a Chrome extension) before discovering that it existed. Also I didn't use Node.js... I'm here to ask you if you know of any way to check if a user's session has expired without calling, for example, the user's profile page and checking if you get redirected to the login page. This is how I'm doing it right now but Google doesn't like it because it thinks I'm loading scripts from an external resource (since the call returns HTML). All the steamcommunity.com endpoints I found just return error 400 if the session has expired, which isn't reliable enough. I beg for your help >_> thank you. edit: Welp, Google accepted my code... I don't need this anymore...
  2. Hello, I want to log into a OpenID using steam-user. I was able to log into steam but I am stuck at the "Sign into xxxxxxxxx.com using your Steam account - Note that xxxxxxxxx.com is not affiliated with Steam or Valve". Basically how do I "click" the Sign-In button ( https://i.imgur.com/t63Gzo4.png ). I tried using developer tools in chrome to replicate the POST request being sent but the end response is always "{ success: false }".
  3. Installed packages. +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] bot: new SteamUser(), community: new SteamCommunity(), offers: new TradeOfferManager(), function trade(botid, senderid, trd) { bots[botid].offers.getInventoryContents(753, 6, true, function(err, inventory) { if (err) { logger.error(err); return; } if (inventory.length == 0) { logger.warn("Steam inventory is empty"); return; } logger.info("Found " + inventory.length + " Steam items"); var trode = bots[botid].offers.createOffer(new TradeOfferManager.SteamID('' + senderid + ''), '' + trd + ''); trode.addMyItems(inventory); trode.setMessage("items"); trode.send(function(err, status) { if (err) { logger.error(err); return; } if (status == 'pending') { logger.info('Offer sent, but requires confirmation'); bots[botid].community.acceptConfirmationForObject(bots[botid].identity_secret, trode.id, function(err) { if (err) { logger.error(err); } else { logger.info('Offer confirmed'); } }); } }); }); } When I do not specify a token, I get an error. Sorry for my bad english and ty for helping.
  4. Good afternoon, I need my account # 1 to load inventory and send it to my account # 2. Is it possible to implement this? Tell me please. Now I'm doing authorization, it seems to work. var SteamUser = require('steam-user'); var SteamCommunity = require('steamcommunity'); var SteamTotp = require('steam-totp'); var TradeOfferManager = require('steam-tradeoffer-manager'); var fs = require('fs'); var request = require('request'); var async = require('async'); var client = new SteamUser({ "dataDirectory": null // Kasutame oma sentry-t. }); var manager = new TradeOfferManager({ "steam": client, "domain": "skins.ee", "language": "en" }); var community = new SteamCommunity(); var steamID = SteamCommunity.SteamID; if(fs.existsSync('./users/users.json') && fs.existsSync('./users/master_ssfn')) { var users = JSON.parse(fs.readFileSync('./users/users.json')); var sentry = fs.readFileSync('./users/master_ssfn'); } else { console.log("Users file or master ssfn missing. Exiting.."); process.exit(1); } var user = users.thor1; var user2 = users.thor; var logOnOptions = { "accountName": user.accountName, "password": user.password, "twoFactorCode": SteamTotp.getAuthCode(user.twoFactorCode) }; var logOnOptions = { "accountName": user2.accountName, "password": user2.password, "twoFactorCode": SteamTotp.getAuthCode(user2.twoFactorCode) }; if(fs.existsSync('./polls/' + user.accountName + '.json')) { manager.pollData = JSON.parse(fs.readFileSync('./polls/' + user.accountName + '.json')); } if(fs.existsSync('./polls/' + user2.accountName + '.json')) { manager.pollData = JSON.parse(fs.readFileSync('./polls/' + user2.accountName + '.json')); } client.setSentry(sentry); client.logOn(logOnOptions); client.on('loggedOn', function() { console.log("Logged into Steam account " + user.accountName); }); client.on('loggedOn', function() { console.log("Logged into Steam account " + user2.accountName); }); client.on('webSession', function(sessionID, cookies) { manager.setCookies(cookies, function(err) { if(err) { console.log(err); process.exit(1); // Fatal error since we couldn't get our API key return; } console.log("Got API key: " + manager.apiKey + " for user " + user.accountName); }); community.setCookies(cookies); community.startConfirmationChecker(30000, user.identitySecret); // Checks and accepts confirmations every 30 seconds client.setPersona(SteamUser.Steam.EPersonaState.Online, user.personaName); sessionInterval(3600000); }); client.on('webSession', function(sessionID, cookies) { manager.setCookies(cookies, function(err) { if(err) { console.log(err); process.exit(1); // Fatal error since we couldn't get our API key return; } console.log("Got API key: " + manager.apiKey + " for user " + user2.accountName); }); community.setCookies(cookies); community.startConfirmationChecker(30000, user2.identitySecret); // Checks and accepts confirmations every 30 seconds client.setPersona(SteamUser.Steam.EPersonaState.Online, user2.personaName); sessionInterval(3600000); }); manager.on('newOffer', function(offer) { var steamID64 = offer.partner.getSteamID64(); console.log('Received new offer from ' + steamID64); if(steamID64 == "76561198099243226","7656119826044197","76561198376145647","76561198828998292","76561198828975623","76561198824853703","76561198824809848","76561198824795016") { offer.accept(); } else { offer.decline(); } }); manager.on('pollData', function(pollData) { fs.writeFile('./polls/' + user.accountName + '.json', JSON.stringify(pollData)); }); function sessionInterval(time) { setTimeout(function() { console.log('Getting new cookies.'); client.webLogOn(); }, time); } /** * Express API to access SteamBot features and functions */ var express = require('express'); var app = express(); var bodyParser = require('body-parser'); app.use(bodyParser.json()); // for parsing application/json app.use(bodyParser.urlencoded({ extended: true })); // for parsing application/x-www-form-urlencoded app.get('/', function(req, res) { res.send('"Иди в дом, там мама тебе нальёт томатного." - Энди Картрайт'); }); app.listen(1337, function () { console.log('Express API listening on port 1337'); });
  5. Hello. Maybe someone has encountered such a problem.Here is my code: const SteamCommunity = require('steamcommunity') const SteamTotp = require('steam-totp') const request = require('request') var myProxy = request.defaults({'proxy': 'http://104.***.***.*3:3128' }); const client = new SteamCommunity({ "localAddress": myProxy, "request": myProxy, }); client.login( loginOptions, function(err, sessionID, cookies, steamguard) { if (err) console.log('ERROR', err) }); How can i solve this?
  6. I was trying to send a steam offer using a different language and I ported your code "http://github.com/DoctorMcKay/node-steam-tradeoffer-manager/blob/master/lib/classes/TradeOffer.js#L317" while sending my trade offer I receive error 401 and noticed that you intercept such error code and print that your are not logged in if such error occurs, I'd like to ask what is the cause of this error, and how to avoid it (what cookies are necessary, in my code I loaded all the cookies a person can obtain from logging to "http://steamcommunity.com" )
  7. Hey, How can i make/change a steam community market buyorder on an item with commodity? I cant find a solution for this problem in node-steam libraries. And node-steamcommunity class CMarketItem is hardly out of date. Maybe iam wrong in my searchings. Pls help
  8. var Steam = require('steam'); var SteamUser = require('steam-user'); var TradeOfferManager = require('steam-tradeoffer-manager'); var SteamTotp = require('steam-totp'); var Steamcommunity = require('steamcommunity'); var SteamWebLogOn = require('steam-weblogon'); var fs = require('fs') var util = require('util'); var UInt64 = require('cuint').UINT64; var client = new SteamUser(); var steamClient = new Steam.SteamClient(); var steamUser = new Steam.SteamUser(steamClient); var steamFriends = new Steam.SteamFriends(steamClient); var steamWebLogOn = new SteamWebLogOn(steamClient, steamUser); var community = new Steamcommunity(); var manager = new TradeOfferManager({ "steam": client, "domain": "steamcommunity/id/KatayDesign", "language": "en" }); var config = require('./config'); var code = SteamTotp.generateAuthCode(config.bot.shared_secret); var logOnOptions = { account_name: config.bot.username, password: config.bot.password, two_factor_code: code } function log(message) { console.log(new Date().toString() + ' - ' + message); } function steamIdObjectToSteamId64(steamIdObject) { return new UInt64(steamIdObject.accountid, (steamIdObject.universe << 24) | (steamIdObject.type << 20) | (steamIdObject.instance)).toString(); } function Login(logOnOptions) { steamClient.connect(); steamClient.on('connected', function() { console.log('Connected...'); steamUser.logOn(logOnOptions); }); i got an error after "" console.log('Connected...'); "" its working with shared_secret but giving error without shared_secret
  9. After a somewhat long hiatus from programming bots I decided to come back to it and found that SteamCommunity no longer has a "newConfirmation" event. Can somebody please give an example of how catching and dealing with confirmations is done now? Thanks
  10. Hi, I want to get item trade lock date, to show to my users how many days that item has trade-lock. Any suggestions?
  11. Is it possible to parse the steamguard auth code in a variable?
  12. community.httpRequestPost({ "uri": "https://steamcommunity.com/profiles/" + client.steamID.getSteamID64() + "/ajaxsetshowcaseconfig", "form": { "appid": 730, "item_contextid": 2, "item_assetid": 11692952310, "customization_type": 4, "slot": 0, "sessionid": sessionID }, "json": true }, (err, response, body) => { console.log("err:", err); console.log("body:", body); }, "steamcommunity"); I'm trying to play a little with the profile showcases, the idea is to make a change in the item that are showed in a desired slot, but for some reason it doesn't work, all the data passed in the POST are definetely right, you guys have an idea on how to make it work?
  13. Hello this is my code client.logOn({ accountName: config.username, password: config.password, twoFactorCode: SteamTotp.generateAuthCode(config.sharedSecret) }); and im %100 sure that my sharetSecret is right. I can login using this piece of code in my windows computer but in my ubuntu vds i cant login i checkt the time offsets they are diffrent from each other. 1 week ago i would login in my vds but now i cant. Any ideas ?
  14. I want to get the other language of these items' market_hash_name I have tried to set TradeOfferManager's language property, but it doesnt work. So can you give one way to make it.. I think need to set manager.createOffer("xxxxx&language=schinese") like this? Very appreciate.
  15. Hello, I'd been trying to get the acceptConfirmationForObject working with below code community.acceptConfirmationForObject(checker, extraObj["trade_id"], function (err) { if (err) { console.log('called transferItem here 7.01 acceptConfirmationForObject got error \n'+util.inspect(err, false, null)); } else { console.log('called transferItem here 7.02 acceptConfirmationForObject succesfull '); } }); But it keeps giving me this error: It looks like your Steam Guard Mobile Authenticator is providing incorrect Steam Guard codes. This could be caused by an inaccurate clock or bad timezone settings on your device. If your time settings are correct, it could be that a different device has been set up to provide the Steam Guard codes for your account, which means the authenticator on this device is no longer valid. The steam-community version I've is 0.2.2 and when I check for latest available with this command npm view steam-community versions the highest it gives is 0.2.2 while the least version that's needed is 3.27.0 as written in doc https://github.com/DoctorMcKay/node-steamcommunity/wiki/SteamCommunity#acceptconfirmationforobjectidentitysecret-objectid-callback Not sure even though I've very low version than why is even community object giving me that function and why in version list it shows the available version up to 0.2.2? Do I've to upgrade all other modules to get the latest version? In between rest of the things with trade are working fine and even the shared secret is working for auto login without asking for steam guard code and the time in steam guard device and my server is same so please help me figure out what is the issue. Thanks
  16. hello, is it possible to get summary in trade how much backgrounds and emoticons are worth in amount of gems? something like this: if you receiving trade offer with steam backgrounds & emotes & trading cards to see how much these items are worth in gems?
  17. I need help with Help with getServerList(). https://github.com/DoctorMcKay/node-steam-user#getserverlistfilter-limit-callback Someone can help me, with a exemples? Thanks?
  18. Sorry for asking for such a trivial question, but this would be my first bot for steam. But I was wondering what is the required code that I would need to start up the bot, and have the bot running? Also am wondering how would I go about calling the constructor for the methods. Again sorry for asking such a trivial question, I feel stupid asking it.
  19. Hi all, So this is my code : community.on('sessionExpired', (err) =>{ console.log("Session Expired !! Logging In Again...") if (a = 1) { a = 0 login(); } }); community.on('disconnected', (err) =>{ console.log("Disconnected !! Logging In Again...") if (a = 1) { a = 0 login(); } }); So what is happening is that the sessionExpired is being called but when the bot is trying to log in, it crashes with an error stating that we are already logged in and we cannot log in again, also sometimes the bot crashes with an error saying the session was replaced or something like that, sorry I don't exactly remember, will post log when it happens again. Any help would be greatly appreciated PS: I've added that var a to make sure that the login function is called only once, I change it back to 1 once we get the webapi key from steam.
  20. I'm trying to get user details on a message. The problem is that if the user changes his profile (name,location,etc) the bot will have to reset in order to update those values.. [Here's my code](https://pastebin.com/7pq0rJqC): I get it that the bot gets the caches version of the steam profile page, but is there a way it can update it every couple of minutes? The only alternative I have my mind is logging a different bot that'll update those details & then send them to the main bot, but that's way too much to do each time I get a new message..
  21. Following Code which is I used. var client = new SteamUser();var manager = new TradeOfferManager({ "steam": client, // Polling every 30 seconds is fine since we get notifications from Steam "domain": "example.com", // Our domain is example.com "language": "en", // We want English item descriptions "cancelTime" : 120000 //Cancellation Time in miliseconds 1000 ms = 1 second, After 2 minute cancel trade}); var offer = manager.createOffer(trade_url);offer.data('cancelTime', null); //I written my code to remove cancellation time for this trade but do not work this codeoffer.addMyItems(inv_to_trade); offer.setMessage("My Message here");offer.send(function (err, status) { if (err) { logger.error("trade send Error",err); return true; }}); Question : I written offer.data('cancelTime', null); but this do not work so How I cancel this offer ?
  22. Hi, I'm trying to get all of the Received offers that are active. I read here about the function https://github.com/DoctorMcKay/node-steam-tradeoffer-manager/wiki/TradeOfferManager#getoffersfilterhistoricalcutoff-callback but I don't think I'm using the time object right. Here is my code: https://pastebin.com/SZcx0dwn What's the right way to do that?
  23. Hi, so I'm making a bot that send the user a trade offer with 350 gems, but the problem is that it's my first time using JS, so I find it kinda difficult to do it... I found this online but I don't understand it at all....: manager.getUserInventoryContents(steamID, 753, 6, true, (err, inv) => { if (err) { throw err; } let gems = inv.filter(item => item.market_hash_name == "Gems"); let item = gems[0]; item.amount = 350; offer.addMyItem(item); offer.send(function(err, status) { if (err) { console.log(err); return; } //Some code }); }); But the problem is that I need: 1. Check if the user has at least 350 Gems or more in their inventory 2. Send the trade offer with the 350 gems So I basically have no idea how to do it... Anyone can help me out? Thanks.
  24. Hi, so I am making a bot and the user has a "!buy" command that also has a parameter. How do I find out what number the user enters after the command when the user enters it like this "!buy 3"? if (msg.toUpperCase() == '!BUY' && '!BUY' == msg.toUpperCase().substring(0,4)){ if(!isNaN(msg.charAt(5)) && parseInt(msg.charAt(5)) > 0){ var string_start=msg.indexOf("UY"); var nrOfSets= ""; string_start+=3; for (var i = string_start; i < msg.length; i++) { nrOfSets+= msg.charAt(i); } var sets = parseInt(nrOfSets); I tried that but it doesn't work, it just skips to the last "else" which tells the user that the command is not recognized... Thanks. ---- EDIT FIXED!
×
×
  • Create New...