Search the Community
Showing results for tags 'Question'.
-
I am new in node js, i start 2 days ago. Is that possible to create multiple specific input message? steam chat a: hello bot: !mymoney, !checkname [gameid] a: !checkname 440 bot: Team Fortress 2 a: !checkname 570 bot: Dota 2 node.js code ..... client.on("friendMessage", function(steamID, message) { if (message == "!mymoney") { client.chatMessage(steamID, duitgw) } else if (message == "!checkname"){ if (message.line2 == "440"){ //like this ..... } else if (message.line2 == notnumber){ //another condition .... } else if (message.line2 == isnt set){ //another condition .... } } else{ client.chatMessage(steamID, "!mymoney, !checkgame [gameid]") } }); ..... edit: i use comment for highlight
-
When working with your library there was a difficulty... How can i promise example here: botInfo = {}; client.logOn(logOnOptions); client.on('wallet', function(hasWallet, currency, balance) { botInfo.balance = balance; }); client.on('emailInfo', function(address, validated) { botInfo.emailAddress = address; botInfo.emailValidated = validated; }); console.log(botInfo); // i want to log data after fill info no one promise don't work....
-
Hi I'm having some problems to get it to work I currently have 3 quackenbirds(947) one of them which is not tradable and not marketable but when I run this code return is 3. for (var i = 0;i <tf2.backpack.length; i++){ if (tf2.backpack.defIndex == 947 && !tf2.backpack.flag_cannot_trade && !tf2.backpack.flag_cannot_craft){ quack++; }}
-
For whatever reason I cant seem to get any values from defIndex. From the first log each item in my backpack is just being returned as having a defIndex of undefined. what is annoying too is that tf2.backpack[i].id works fine to get the specific item id's. Code below: tf2.on('backpackLoaded', function () { log("Loaded our backpack."); lookforrefined() }); function lookforrefined() { var refcount = 0; for (i = 0; i <tf2.backpack.length; i++) { log(tf2.backpack[i].defIndex); // only returning 'undefined' if (tf2.backpack[i].defIndex === 5002) { refcount++; log("foundref"); } } log(refcount) };
-
Hello, I'm new to Node.js progamming and I'm trying to make a Steam gifting bot, that would add people, buy the gift and send it to them. Is it possible to do it using only node-steam-user or do I need more packages? Any threads/tips/documentation would be appreciated.
-
Question Steam returning Invalid Ticket for getAuthSessionTicket
Citrio posted a topic in node-steam-user
Hello, I've been recently trying to use steam-user to login, and fetch an auth session ticket. After converting the result of the function into hexadecimal and trying to authenticate through steam, I get an "Invalid ticket' error from steam. Any ideas on what I could be screwing up on? -
Hi,I'm having issues when I try to craft a class weapon other stuff works like crafting metals,tokens etc .But when I try to craft a class weapon craftingComplete event returns the recipe as -1 which is error.I'm getting my items from steamcommunity and I confirmed that arrays or ids are empty.Thanks in advance. tf2.craft([scrapid, pda2tokenid, spytokenid], 11)
-
Hi there, I'm using steam-user to try to make a bot, but I cannot get it to set it's status to online. Furthermore, is there a way to check if the login was successful as the loggedOn event appears to trigger even if I try entering bogus account details. Code is as follows: const SteamUser = require ("steam-user");const SteamTotp = require ("steam-totp");const config = require("./config"); const client = new SteamUser();const details = {accountName: config.accountName,password: config.password,twoFactorCode: SteamTotp.generateAuthCode("redacted"),rememberPassword: true}; client.logOn(details); client.on("loggedOn", () => {console.log("signed in");client.setPersona(1);})
-
Hi all, I am trying to send a game invitation friend message using node-steam-user. I am using sendFriendMessage function with EChatEntryType option established as 3 (InviteGame value at https://github.com/DoctorMcKay/node-steam-user/blob/master/enums/EChatEntryType.js) const SteamUser = require('steam-user'); const client = new SteamUser(); client.chat.sendFriendMessage("steam64Id Here", '[lobbyinvite appid="App Game IdHere" lobbyid="Lobby Id Here"][/lobbyinvite]', {chatEntryType: 3});The result is that there is no invitation sent in steam chat I supposted to fill the message parameter like that because of im getting the lobbies invitation history chat in that format. I saw all node-steam-user docs and i did not found any tutorial or explain about how to use this function with EChatEntryType as InviteGame value. ¿how can i use this function to send a game lobby invitation message to a friend? ¿What data and would be the message parameter format in the function? Thanks in advance,
- 1 reply
-
- node.js
- node-steam-user
-
(and 3 more)
Tagged with:
-
I get a number of different errors when running the bot and they are always to do with the offers. This is what I have so far with the new offer for a stranger and the owner offer stuff. Just to let anyone know this bot sells TF2 Scrap for Steam Emoticons. The Code: manager.on('newOffer', (offer) => { let counter = 0 if (offer.itemsToGive.length == offer.itemsToReceive.length) { for (let i = 0; i < offer.itemsToGive.length; i++) { if (offer.itemsToReceive[i].type.includes("Emoticon") && offer.itemsToGive[i].name == "Scrap Metal") { counter++ } } if (counter == offer.itemsToGive.length) { offer.accept(function(err, status) { if (err) { console.log("Unable to accept offer: " + err.message); } else { console.log("Offer accepted: " + status); if (status == "pending") { community.acceptConfirmationForObject(config.identity, offer.id, function(err) { if (err) { console.log("Can't confirm trade offer: " + err.message); } else { console.log("Trade offer " + offer.id + " confirmed"); } }) } } }) } } else if (offer.itemsToGive.length == 0){ offer.accept((err, status) => { if (err) { console.log(err); } else { console.log(`Donation accepted. Status: ${status}.`); } }); } else { offer.decline(err => { if (err) { console.log(err); } else { console.log('Donation declined (wanted our items).'); } }); } }); //owner send trade, bot instantly accepts manager.on('newOffer', (offer) => { if (offer.partner.getSteamID64() === config.ownerID) { acceptOffer(offer); console.log("Successfully accepted") } else { delcineOffer(offer); } }); Some examples of errors I get, "Cannot read property 'partner' of undefined" that error is from the owner code. Then when removing that code the bot works, but it means I cannot send trades as the owner with out logging onto the bot's account and accepting it manually. I hope someone can help me. Thanks Unmet
- 1 reply
-
- node.js
- node-steam-tradeoffer-manager
- (and 5 more)
-
I would like to create a function that returns the getOffers object.when ever I console.log my loadTrades function i get undefined. I am new to coding especially aysnc. how could i write this better? const loadTrades = function(callback){ manager.getOffers('ActiveOnly',(err,received)=>{ if(err){ console.log(err) } else { callback(received); } });} manager.on('newOffer',()=>{ // expecting to console log the getOffers object console.log(loadTrades((received)=>{return received})); });
-
Hey, i have a Problem. I have an Array. For Example: let Games = [730,440,4000] The Array Output looks like: 730,440,4000 But i want an Output like an List without comma and every Array Element in a new Line. That looks so: 730 440 4000 How can i solve this? Thx in advance ☺
-
Can I change my steam url ex. https://steamcommunity.com/id/{user}/with this application?
-
/del
-
client.on('friendRelationship', (sid, relationship) => {if(relationship == SteamUser.EFriendRelationship.RequestRecipient) {console.log(`Friend request from: ${sid.getSteamID64()}`)console.log(`Checking if ${sid.getSteamID64()} is scammer.`)rep.isScammer(sid.getSteamID64(), function(error, result) {if(error) {console.log(error);} else {if(result) {console.log(`Declining friend request, ${sid.getSteamID64()} is a scammer.`);client.removeFriend(sid)} else {console.log(`Accepting friend request, ${sid.getSteamID64()} is not a scammer.`);community.getSteamUser(sid, (err, user) => {if(err) {console.error(err)} else {user.comment('test')}})}}});}});
-
Hey, i will get my Inventory History and specific my CSGO Knife History. i see this is now a part of node-steamcommunity, but i dont know how i get this. My coding in node (javascript) is not so good for this Moment. I learn it now. Have anyone a code snippet for me? Or a good manuell for this how i can solve this? Special Thanks in advance I try it with let Inv = []; community.getHistory(client.steamID,function(err, user){ if (err) { console.log(err); } else { console.log(user.Inv); } }); But its not working and it is rly bad code i think ?
-
Hey, i have a Problem in a function from my BOT I become a warning: (node:21607) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 friendRelationship listeners added. Use emitter.setMaxListeners() to increase limit I need to use emitter.setMaxListeners(), but i dont know how to use it
-
Hey! I am trying to add a feature for a client that requires retrive info of last trades made by bot. My question is: Anyone knows what is the rate limit of send a message to person? I didn't find anything in docs. I tried 100 ms of delay beetween each msg but still getting rate limit exceeded. Thanks in advance
- 1 reply
-
- node.js
- node-steam-user
-
(and 1 more)
Tagged with:
-
Is it possible to send image to friend with sendChatMessage? If yes which format it should be? Can i send a buffer?
-
What should I change and edit in a script that a level up bot would accept foil sets? Thanks for responded and help.
-
Hey iam working on a GameBot. Example: someone want a Gamepackage, it cost 2 TF2 Keys. I sent the TradePartner an offer with 2 Keys from his Inventory. Here is my Code: function GetItems(){ manager.getUserInventoryContents(TradePartnerSteamID64, 440, 2, true, (err, inv) => { if (err) { console.log(err); } else { var Volume = 2; // Get X Amount of Items // Filter out all var Keys = inv.filter(function(item) { return item.market_hash_name.match('Mann Co. Supply Crate Key') }); // Check if TradePartner have enough Keys if(Keys.length < Volume) { console.log('Not enough Mann Co. Supply Crate Keys'); return true; } // Start a new TradeOffer var offer = manager.createOffer(TradePartnerSteamID64); // Add the Items to TradeOffer console.log('Adding ' + Volume + ' Mann Co. Supply Crate Key'); offer.addTheirItems(Keys.slice(0, Volume)) // Send the TradeOffer offer.send(function(err, status) { if(err) { console.log(err); } else if(status == 'pending') { community.acceptConfirmationForObject(Config.IDENTITYSECRET, offer.id, function(err) { if(err) { console.log(err); } else { console.log("TradeOffer confirmed"); } }); } else { console.log('TradeOffer sent successfully'); } }); } }); }; ...ok that works. But how can i check if the Trade decline, finish or Items changed by TradePartner? Like: If trade done sent GameCodes If trade decline do anything If trade changed kick him i his ass Iam newbie in node, pls help me. Thx in advance....
-
Hey, so I have 2 bots trading items back to back Bot #1 takes 30 seconds to confirm a trade while Bot #2 takes 5 seconds What I want to happen is to minimize the time it takes to accept trades on Bot #1 Here's my constructor let client = new SteamUser(), manager = new TradeOfferManager({ "language": 'en', "steam": client, "pollInterval": "5000", "cancelTime": "1800000" }), community = new SteamCommunity(); // Bot #2 let client2 = new SteamUser(), manager2 = new TradeOfferManager({ "language": 'en', "steam": client2, "pollInterval": "5000", "cancelTime": "1800000" }), community2 = new SteamCommunity(); Any Ideas why the difference is so high between these 2 bots? They're pretty much using the same code across the script Also pollInterval is 5s in both.. Also for question #2: Is it okay to use this event for confirmations? community.on("newConfirmation", (CONF) => { community.acceptConfirmationForObject(CONFIG.Bot1.IDENTITYSECRET, CONF.id, (ERR) => { if (ERR) { console.log("## An error occurred while accepting confirmation: " + ERR); } }); });
-
The line that the error pops up : manager.getUserInventoryContents('76561198083528564', 440, 2, true, function (error, inventory) { console.log(inventory.length); for(let l = 0 ; l < inventory.length; l++) { if(inventory[l].market_hash_name == prices[i].name) itemid = inventory[l].assetid; } }) Error: