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. 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++; }}
  2. 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) };
  3. 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.
  4. 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?
  5. 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)
  6. 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);})
  7. 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,
  8. 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
  9. client.on("friendsList", function(){ console.log(client.myFriends); });If I use this code I get a list. How can I get a integer number? Thank you!
  10. 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})); });
  11. 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 ☺
  12. Can I change my steam url ex. https://steamcommunity.com/id/{user}/with this application?
  13. 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')}})}}});}});
  14. 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 ?
  15. 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
  16. 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
  17. Is it possible to send image to friend with sendChatMessage? If yes which format it should be? Can i send a buffer?
  18. Hi, I wonder if it is possible to get market item name and image url by market listing id from confirmation, I wonder how does mobile steam app creating its list of confirmations where you can see thumbnails and names of items on confirmations list.
  19. What should I change and edit in a script that a level up bot would accept foil sets? Thanks for responded and help.
  20. 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....
  21. 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); } }); });
  22. 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:
  23. Hello mates! This might be a weird question, but I'm having trouble getting "client.getPersonas" to function in a module.export. Here is my file my problem is located in: (Problem is in the exports.GetSteamName) var exports = module.exports = {}; var SteamUser = require('steam-user'); var client = new SteamUser(); const SteamRepAPI = require('steamrep'); exports.CheckRep = function (SteamId64) { return new Promise(resolve => { SteamRepAPI.isScammer(SteamId64, function (err, result) { if (err) { console.log("Error Checking SteamREP for " + SteamId64); resolve(true); // true == Not a scammer } else { if (result) { console.log("eww thats gross") resolve(false); } else { console.log("Got Not-Scammer!") resolve(true); // true == Not a scammer } } }); }) } exports.GetSteamName = function (SteamID) { return new Promise(resolve => { client.getPersonas([SteamID], function (personas) { persona = personas[SteamID.getSteamID64()]; name = persona ? persona.player_name : ("[" + SteamID.getSteamID64() + "]"); resolve(name) }) }) } What happens is once the program gets to"client.getPersonas([steamID], function (personas) {" , it seems to run over everything inside of the function(personas). Including the "resolve" If I were to change exports.GetSteamName to: exports.GetSteamName = function (SteamID) { return new Promise(resolve => { client.getPersonas([SteamID], function (personas) { persona = personas[SteamID.getSteamID64()]; name = persona ? persona.player_name : ("[" + SteamID.getSteamID64() + "]"); resolve(name) }) console.log("Fired?") }) } I will get back "Fired?" in console. The problem is present in another file I am using for Chat messages.The problem is not present in "CheckRep". This could just be me not understanding how module.exports works exactly as this is still a somewhat new concept for me.CheckRep, however, works as expected and that's what I'm getting caught up on. I think it could be that "SteamUser" and "client" are being called more than expected (I'm declaring them in multiple files).SteamRepAPI is only declared in this file. I have resorted to moving the function into the main file, which works as expected. I would greatly prefer it to function in this file. Taken from package.json:"steam-user": "^3.28.2", Any help is greatly appreciated, Thanks!
  24. Hello My BoT is in a couple group chat rooms and is catching all messages starting with "!" in order to execute commands. I have an issue every time someone joins the chat room and Steam displays this: BoT returns: UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'startsWith' of null I thought that "messages" and server_messages were 2 different items, so why the error when my code is: function parseMessage(groupID, chatID, message, senderID, senderAccountID, sender) { if (message && !message.startsWith('!')) { return; } Isn't the "joined" stuff a server message? How do I get rid of the error? Thanks as always
×
×
  • Create New...