Search the Community
Showing results for tags 'Question'.
-
Hello With new steam chat we get a trade notification chat message together with any incoming offer from a friend: https://i.imgur.com/PV4TgEu.jpg My problem is that when I'm using this code: //Chat Messages Check //This will fire when we receive a chat message from ANY friend client.on('friendMessage', function(steamID, message) { client.getPersonas([steamID], function (personas) { console.log('Friend message from ' + personas[steamID]["player_name"] + ': ' + message); }); }); Bot's notifications aren't cleared (there is one for every trade offer); so my question is, there's a way to keep that code and clear trade notifications altogether (maybe something which fires after a trade is received)? Thanks
-
You know, I've been trying to find out whether or not this is allowed and every time I ask Valve they refuse to answer. They deliberately say they can not answer. There was someone who tried to explain how to use this script to change your name yellow, but I didn't quite understand really. I'm not a coder really and all I was looking for is a way to change my name yellow in a simple safe way. I don't even know what this tool of yours does or how to run it even. But I am hoping you might be able to shed some light on whether or not Steam till ban people for using it to make their names yellow/gold. If it is allowed, is there a simple thing I can just run once to set my state? I have no idea what this thing is or does. Just an average user looking to set their name to gold using the "PersonaStateFlags" #4.
-
Hey, so I'm trying to get user's personaName in a sent trade offer. I'm pretty sure I'm doing this right, but I can't figure out what's causing the error.. manager.on("sentOfferChanged", (OFFER, OLDSTATE) => { OFFER.getUserDetails((err, me, them) => { theirname = them.personaName; console.log(theirname); }); });
-
Hello fellas ... I'm trying to add a kind of "counter" to trades sent by my LevelUp BOT. I'm fairly lazy about programming, I do things on the basis of trial and error. The results, of course, are not always satisfactory. with the screenshots it will be easy to understand what I want. I tried use +conf.creator https://prnt.sc/mf6xbj but I realized trade offer not YET created and therefore, I would not get the result I want then I tried use: +offer.id https://prnt.sc/mf74ef and the result was null I don't want the result to necessarily be the token of the trade offer. I want there to have an accountant that changes according to the exchange offers that my bot sends.
-
How do I get the names of all available games on steam displaying on the website? Here's my code. It just displays a blank page for like 5 seconds and displays an "Already logged on, cannot log on again" error. How do I properly display it? client.on("appOwnershipCached", () => { let gameArr = client.getOwnedApps(); client.getProductInfo( gameArr, [], (err, apps, packages, unknownApps, unknownPackages) => { for (var appid in apps) { res.send(apps[appid].appinfo.common.name); } } ); });
-
Question How to add only 1 item type to offer
roughnecks posted a topic in node-steam-tradeoffer-manager
Say I want to create an offer but need to add just Trading Cards to it, how do I select them? I already know about appid, contextid and "item_class_2" but I need a working example after I loaded my Inventory, which has 4 [Object] inside "tags": CEconItem { appid: 753, contextid: '6', assetid: '10305554518', classid: '1496965455', instanceid: '0', amount: 1, pos: 30, id: '10305554518', background_color: '', icon_url: 'IzMF03bk9WpSBq-S-ekoE33L-iLqGFHVaU25ZzQNQcXdA3g5gMEPvUZZEaiHLrVJRsl8vGuCUY7Cjc9ehDNVzDMCeHqtjCQrcex4NM6b8wT1tePGP3j2fSSCJizYG1s1RLtXYTzc9zSjsL-QQj6dE-wkEggGfvQA8GFPPZzbNhM_1YcK_GPhwwp3DhFucMpUdAqp9X0eMLoglXVEd59RmXWjJpDc1F5hYUA8W-2yBLzHbdLzlSYhCxtiGvEYMYOXsXDyuMmmfLGLLIM8gGfI', icon_url_large: 'IzMF03bk9WpSBq-S-ekoE33L-iLqGFHVaU25ZzQNQcXdA3g5gMEPvUZZEaiHLrVJRsl8vGuCUY7Cjc9ehDNVzDMCeHqtjCQrcex4NM6b8wT1tePGP3j2fSSCJizYG1s1RLtXYTzc9zSjsL-QQj6dE-wkEggGfvQA8GFPPZzbNhM_1YcK_GPhwwp3DhFucMpUdAqp9X0eMLoglXVEd59RmXWjJpDc1F5hYUA8W-2yBLzHbdLzlSYhCxtiGvEYMYOXsXDyuMmmfLGLLIM8gGfI', descriptions: [ [Object] ], tradable: true, owner_actions: [ [Object], [Object] ], name: 'Santa Claus', type: 'Solitaire Christmas. Match 2 Cards Trading Card', market_name: 'Santa Claus', market_hash_name: '428510-Santa Claus', market_fee_app: 428510, commodity: true, market_tradable_restriction: 7, market_marketable_restriction: 7, marketable: true, tags: [ [Object], [Object], [Object], [Object] ], is_currency: false, fraudwarnings: [] }, CEconItem { -
How can I fix this? https://imgur.com/a/8N6prv5
-
Hi again What is the best approach to determine if an Item belonging to Steam Inventory 753 - contextid 6 (steam community) - is a Card, Booster, etc... I was looking at the "offer" object for an incoming offer and found out that Booster Packs and Gems are actually called like that under "type" but for cards, bgs and emotes it's a little different - some examples: 1) type: '"Glow Ball" - The billiard puzzle game Trading Card', 2) type: 'DISTRAINT: Deluxe Edition Uncommon Emoticon', 3) type: 'Unexpected Day Profile Background', So, should I use the type value and match for e.g. "Emoticon" or is there a better way to identify those items' type? Thanks
-
I have problem: 2019-01-14T16:31:25.036Z - error: Error polling for trade offers: Error: socket hang up2019-01-14T18:31:43.234Z - error: Error polling for trade offers: Error: socket hang upMy server:- Ubuntu 14.04 Plesk (64bit)- I use nodejs server with express + ssl My suuport told me do this ( https://support.plesk.com/hc/en-us/articles/115002107425--HUB-503-Service-Unavailable-on-Plesk-server ). After i do this: (set Default site to none via Plesk: Tools & Settings>IP Addresses> your_IP_Address ).All this didn't help me, what i need do?
-
I've been researching for the past 2-3 hours about generating in-game screenshots/images of CSGO items. (The type where you inspect them) The *only* thing I've found is a little paragraph under the title 'Console Commands' here: https://developer.valvesoftware.com/wiki/Counter-Strike:_Global_Offensive_Economy_Items I'm looking to add an in-game screenshot feature to my website coming out soon. Services that offer this screenshotting feature that is generated in the website: - metjm.net - csgro.com - csgo.gallery - cs.money (They also offer a pretty sweet 3D option as well as shown here: https://3d.cs.money/?t=5&link=4pzIYq3) - opskins.com (Used to when they were still around) It seems very hush-hush online. I cannot find anything - no libraries - nothing about this sort of thing. Does doctormckay's library offer the ability to do this? Can I be pointed in the right direction to build my own? Thanks for taking the time to consider my question
-
community.acceptConfirmationForObject(identitySecret, offer.id, function(err) { if(err){ console.log(chalk.red("Confirmation Failed for " + offer.id + ": " + err)); } else { console.log(chalk.green("Offer " + offer.id + ": Confirmed!")); } }); How can I delay this ^ for a couple seconds, avoiding it being fired earlier than offer.accept (which is right before)? I know this is more a coding issue rather than module's issue but I'm beginning to code in js and this async stuff hurts Thanks
-
Question Like a artwork with the node-steam-user module?
loleks420 posted a topic in node-steam-user
I got a output from: client.getPublishedFileDetails(1607555098, (err, results) =>{ console.log(results);});So my Question is, can you like artworks with this module or do i have to write a request function?Thanks for your help -
Hello good day, I am new to coding. mainClient.on('webSession', function(sessionID, cookies) { mainManager.setCookies(cookies, function(err) { if (err) { // Handle Error. console.log(err); process.exit(1); // Exit, if we cannot connect, since we can't do anything. return; } mainManager.getInventoryContents(753, 6, true, function(err, inv) { // Load Inventory if (err) { // Handle Error. console.log('Error, in loading our inventory.') return; } if (inv.length == 0){ console.log('Inventory is empty, add some items(cheap ones, like trading cards or gems)') } var firstOffer = mainManager.createOffer(config.accounts.account2.tradelink); // Intialize Trade Offer var itemname = inv[0].market_hash_name.toLowerCase(); console.log('The item in which we are using is a/an ' + itemname) firstOffer.addMyItem(inv[0]); firstOffer.setMessage(SECURITY_CODE.toString()); // Set a message, so no one can slip in a trade, and try to steal your items. firstOffer.send((err, status) => { // Send offer. if (status == 'pending') { // Check if it needs to be confirmed. mainCommunity.acceptConfirmationForObject(config.accounts.account1.identity_secret, firstOffer.id, function(err) { // Try to accept Trade if (err) { // Handle, any accepting errors. console.log('Error accepting Trade.'); return; } else { // It worked fine, Now the farm begins. console.log('Trade offered. Counter is at : ' + counter); } }); } }); }); }); // Set Cookies. mainCommunity.setCookies(cookies); }); If one of the err fails, It cannot return to first. I mean is it stock like example " Error accepting Trade" . Like that. I just want to return until it goes to console.log('Trade offered. Counter is at : ' + counter);. Thank you for the help.
-
Hello My bot is not running. I send an offer to it and then start it. Trade offer gets accepted but I get the error message "This trade offer is no longer valid." It's happening when retrieving UserDetails: if (offer.itemsToGive.length === 0) { offer.getUserDetails((err, me, them) => { if (typeof (them) !== 'undefined') { donator = them.personaName; console.log(`donator is: ${donator}`); } else { console.log(err); } }); because I'm not getting donator's name. This is my console.log: Error: This trade offer is no longer valid. at SteamCommunity._checkTradeError (D:\Portable\Birba\node_modules\steamcommunity\components\http.js:144:13) at Request._callback (D:\Portable\Birba\node_modules\steamcommunity\components\http.js:52:80) at Request.self.callback (D:\Portable\Birba\node_modules\request\request.js:185:22) at Request.emit (events.js:182:13) at Request.<anonymous> (D:\Portable\Birba\node_modules\request\request.js:1161:10) at Request.emit (events.js:182:13) at Gunzip.<anonymous> (D:\Portable\Birba\node_modules\request\request.js:1083:12) at Object.onceWrapper (events.js:273:13) at Gunzip.emit (events.js:187:15) at endReadableNT (_stream_readable.js:1094:12)Donation accepted. Status: accepted. Problem is, I'm posting a comment on bot's profile upon successful incoming donation and if there are offers BEFORE I run the bot, comments are not posted, since there's a check on "donator" and it doesn't return. BUT: If I keep the bot running and then send one more offer, it gets accepted and all is working fine without errors. donator is: roughnecks Donation accepted. Status: accepted. Comment Posted
-
I have problem: 2019-01-14T16:31:25.036Z - error: Error polling for trade offers: Error: socket hang up2019-01-14T18:31:43.234Z - error: Error polling for trade offers: Error: socket hang upMy server:- Ubuntu 14.04 Plesk (64bit)- I use nodejs server with express + ssl My suuport told me do this ( https://support.plesk.com/hc/en-us/articles/115002107425--HUB-503-Service-Unavailable-on-Plesk-server ). After i do this: (set Default site to none via Plesk: Tools & Settings>IP Addresses> your_IP_Address ).All this didn't help me, what i need do?
-
How to accept request who sent with script offline and acc have pending request . This dont work. steam.on('friendRelationship', (steamid, relationship) => { if(relationship == 2){ steam.addFriend(steamid); steam.chatMessage(steamid, "Hi"); } });
-
Question How to get Ticketcrc and h_steampipe from a Csgo-match
Jaeger33211 posted a topic in General
Hello i need for my project the Ticketcrc and the h_steampipe, i looked into the documentation, i thought i can do it with AuthTicketstatus but that does not seem to work at all. I get a ticket and thats it. I cant get any information about the encryptionKeyeither. For the next question, does anyone know where i get more informations to h_steam_pipe? Cause i cant find any. Thanks for your help guys. Have a great day! -
Hello, sorry for stupid post but I have question why after use this code second time console.log print the same information twice? 3 turns on 3 times when I use in other place 'loggedOn' I see again console.log(this.informations) in other function. Someone can tell me why and what I can to do with that? Sorry for my rip English and code. { let p = new Promise((resolve,reject)=>{ this.steam.logOn(this.account_details); this.steam.on('loggedOn', () => { this.steam.setPersona(SteamUser.Steam.EPersonaState.Online); this.informations.steamID=this.steam.client.steamID; this.informations.accountid=this.steam.steamID.accountid; console.log(this.informations); this.steam.logOff(); setTimeout(()=>{ resolve(true); },1000); }); }); return p.then((resolve)=>{ console.log(`...`); }); } Console:
-
Hi, im sorry to bother you but i need a litte bit of help. I need to find, how to get my sended offers and to be honest, I dont even know where to start, what function use and even if its possible or if i will need o save every trade i send. Thank you
-
I'm running a bot and the majority of trade offers are not going through. The bot logs in and handles expired sessions like this: let client = new SteamUser(); let community = new SteamCommunity(); let manager = new TradeOfferManager({ community: community, steam: client, domain: "example.com", language: "en", pollInterval: 2000 }); let logOnOptions = { "accountName": data.username, "password": data.password, "twoFactorCode": SteamTotp.getAuthCode(data.shared_secret) }; client.logOn(logOnOptions); client.on('loggedOn', function() { console.log("Logged into Steam"); client.setPersona(SteamUser.EPersonaState.Online); }); client.on('webSession', function(sessionID, cookies) { manager.setCookies(cookies); community.setCookies(cookies); console.log("weblogon") }); community.on("sessionExpired", function(err) { console.log("## Session Expired"); client.webLogOn(); }); The bot gets new offers with manager.on('newOffer', function(offer) { , makes a simple request using https://www.npmjs.com/package/request and calls offer.getUserDetails. An offer is accepted like this: offer.accept(accept(offer, 1)); These are the two functions that handle accepting and confirming trades: function confirm(offer, count) { return function(err) { if (err) { if (count < 20) { console.log(err); setTimeout(community.acceptConfirmationForObject, 10000, data.identity_secret, offer.id, confirm(offer, count + 1)); } else { console.error("CONFIRM FUNCTION: "); console.error(err); } } } } function accept(offer, count) { return function(err, status) { if (err) { if (count < 20) { console.log(err); setTimeout(offer.accept, 10000, accept(offer, count + 1)); } else { console.error("ACCEPT FUNCTION: "); console.error(err); } } else { if (status === "pending") { community.acceptConfirmationForObject(data.identity_secret, offer.id, confirm(offer, 1)); } } } } Whenever I run the code it works for a few hours accepting offers and confirming them. Then offer comes in and the sessionExpired and webSession events are emitted twice. Error: Cannot accept an unsent offer happens every time it tries to accept the offer. This from stdout (it also logs the timestamp): 16:31:23 Error: Not Logged In at SteamCommunity._checkCommunityError (/home/user/bot/node_modules/steamcommunity/components/http.js:128:9) at Request._callback (/home/user/bot/node_modules/steamcommunity/components/http.js:51:88) at Request.self.callback (/home/user/bot/node_modules/request/request.js:185:22) at emitTwo (events.js:126:13) at Request.emit (events.js:214:7) at Request.<anonymous> (/home/user/bot/node_modules/request/request.js:1161:10) at emitOne (events.js:116:13) at Request.emit (events.js:211:7) at Gunzip.<anonymous> (/home/user/bot/node_modules/request/request.js:1083:12) at Object.onceWrapper (events.js:313:30) 16:31:23 ## Session Expired 16:31:23 ## Session Expired 16:31:23 Error: Not Logged In at SteamCommunity.manager._community.httpRequestPost (/home/user/bot/node_modules/steam-tradeoffer-manager/lib/classes/TradeOffer.js:483:25) at Request._callback (/home/user/bot/node_modules/steamcommunity/components/http.js:67:15) at Request.self.callback (/home/user/bot/node_modules/request/request.js:185:22) at emitTwo (events.js:126:13) at Request.emit (events.js:214:7) at Request.<anonymous> (/home/user/bot/node_modules/request/request.js:1161:10) at emitOne (events.js:116:13) at Request.emit (events.js:211:7) at IncomingMessage.<anonymous> (/home/user/bot/node_modules/request/request.js:1083:12) at Object.onceWrapper (events.js:313:30) 16:31:23 weblogon 16:31:24 weblogon 16:31:33 Error: Cannot accept an unsent offer at Timeout.TradeOffer.accept [as _onTimeout] (/home/user/bot/node_modules/steam-tradeoffer-manager/lib/classes/TradeOffer.js:451:23) at ontimeout (timers.js:502:15) at tryOnTimeout (timers.js:323:5) at Timer.listOnTimeout (timers.js:290:5) 16:31:43 Error: Cannot accept an unsent offer at Timeout.TradeOffer.accept [as _onTimeout] (/home/user/bot/node_modules/steam-tradeoffer-manager/lib/classes/TradeOffer.js:451:23) at ontimeout (timers.js:502:15) at tryOnTimeout (timers.js:323:5) at Timer.listOnTimeout (timers.js:290:5) ... etc What am I doing wrong?
-
Question How to random trading cards in trade
orcnaydn posted a topic in node-steam-tradeoffer-manager
community.getUserInventoryContents(partner, 753, 6, true, (error, items) => { if(error) { users.removeReservation(partner, true, removeFunc); return callback(error); } let count = 0; for(let i = 0; i < items.length; i++) { let item = items[i]; if(item.type.toLowerCase() != "Trading Card") continue; count += item.amount; if(count > price) { item.amount -= (count - price); count -= (count - price); } offer.addTheirItem(item); if(count == price) break; } if(count < price) { users.removeReservation(partner, true, removeFunc); return callback("You do not have enough gems to purchase random games."); } if(count > price) { users.removeReservation(partner, true, removeFunc); return callback("An unexpected error occurred, please try again."); } offer.send((error, status) => { if(error) { users.removeReservation(partner, true, removeFunc); return callback(error); } if(status == "pending") { community.acceptConfirmationForObject(files.getConfig().identity, offer.id, error => { if(error) { users.removeReservation(partner, true, removeFunc); return callback(error); } callback(null, "https://steamcommunity.com/tradeoffer/" + offer.id); }); } else if(status == "sent") callback(null, "https://steamcommunity.com/tradeoffer/" + offer.id); }); }); break; default: users.removeReservation(partner, true, (error) => { if(error) return callback(error); return callback("Invalid payment method"); }); } }); }); } Where is my fault? -
Hello. I'm new to all this stuff, so just a generic question before I dig further in. Can I create a bot which only accepts donations (i.e. no item loss from bot side) if the associated steam account doesn't use Mobile 2FA but is not a limited account (using email auth)? I'm asking because trying this code... client.on('webSession', (sessionid, cookies) => { manager.setCookies(cookies); community.setCookies(cookies); community.startConfirmationChecker(10000, 'my_identity_secret'); }); ...I'm not sure how to avoid that "identity_secret" argument. Thanks
-
var api = require('steam-price-api'); var colors = require('colors'); //"Exalted Manifold Paradox" var iname ="Inscribed Blades of Voth Domosh"; item_price =function(item_name){ var result; api.getprice(570,item_name,function(err, data){ var price = data.body.lowest_price; var valid = price.replace(" ","").replace("TL","").replace(",","."); var last= parseFloat(valid.split(" ")[0]); console.log(last); //return last; },17) } console.log(item_price(iname));