Jump to content
McKay Development

iLuk

Member
  • Posts

    6
  • Joined

  • Last visited

Everything posted by iLuk

  1. It also happens when the bot is logged in. How can I edit this function to return error when it fails? SteamUser.prototype.getPersonas = function(steamids, callback) { var Flags = Steam.EClientPersonaStateFlag; var flags = Flags.Status|Flags.PlayerName|Flags.QueryPort|Flags.SourceID|Flags.Presence| Flags.Metadata|Flags.LastSeen|Flags.ClanInfo|Flags.GameExtraInfo|Flags.GameDataBlob| Flags.ClanTag|Flags.Facebook; var ids = steamids.map(function(id) { if(typeof id === 'string') { return (new SteamID(id)).getSteamID64(); } return id.toString(); }); this._send(Steam.EMsg.ClientRequestFriendData, { "friends": ids, "persona_state_requested": flags }); if(callback) { var output = {}; var self = this; ids.forEach(function(id) { self.once('user#' + id, receive); }); function receive(sid, user) { var sid64 = sid.getSteamID64(); output[sid64] = user; var index = ids.indexOf(sid64); if(index != -1) { ids.splice(index, 1); } if(ids.length === 0) { callback(output); } } } };
  2. I can do something like that: var partnerName; client.getPersonas([partnerId], function (persona) { partnerName = persona[partnerId].player_name; }); setTimeout(function(){ if (partnerName == undefined) // data unavailable },2000);but is there a better option?
  3. When you are logged out. It happened to my bot when it was reconnecting to Steam after losing the connection. @Edit Can I check somehow if the bot is logged in?
  4. Hi, when I use GetPersonas there's a possibility that the requested data would be unavailable. Unfortunately there's no error callback. How can I check it? I mean something like this: if (GetPersonas is unavailable) // do something...
  5. Thanks for the answer, it explains a lot for me! Am I right that I also don't get notifications from Steam client about "receivedOfferChanged"? And polling every 5 000 ms is ok with Steam?
  6. Hi, I would like to know what is the fastest way to get notifications from Steam. Should I use: "steam": client, or set pollInterval: "pollInterval": 1000 If so then how low can I go? Maybe both? Sorry if I said something incorrect.
×
×
  • Create New...