Jump to content
McKay Development

Recommended Posts

Posted
3 hours ago, Dr. McKay said:

const SteamID = require('steamid');
const URL = require('url');

let link = 'https://steamcommunity.com/tradeoffer/new/?partner=46143802&token=aaaaaaaa';
let steamid = SteamID.fromIndividualAccountID(URL.parse(link, true).query.partner);

 

I couldn't find the answer just looking it up on your site and google, so hopefully this helps anyone with the same question in the future. Thank you very much!

Posted
On 2/7/2020 at 6:31 AM, Dr. McKay said:

const SteamID = require('steamid');
const URL = require('url');

let link = 'https://steamcommunity.com/tradeoffer/new/?partner=46143802&token=aaaaaaaa';
let steamid = SteamID.fromIndividualAccountID(URL.parse(link, true).query.partner);

 

Hey there, today I managed to try out the code and I have another question. I get: 

SteamID { universe: 1, type: 1, instance: 1, accountid: 92222221 }

when using this function:

module.exports.IDFetcher = function(link) {
    const SteamID = require('steamid');
    const URL = require('url');
    steamid_of_user = SteamID.fromIndividualAccountID(URL.parse(link, true).query.partner);
    return steamid_of_user;
}

So while it gives me the account id, it doesn't convert it to a SteamID, which is something I don't know how to do. I have also tried inputting account id's into SteamID.fromIndividualAccountID but still get an object with what I input.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...