Jump to content
McKay Development

Recommended Posts

Posted

Hi guys!

 

What is the best way for me to check if a user (i have their steamid64) has activated their mobile steam guard authenticator and no longer have a 15 days trade probation? 

for now, im using this method:

 

 Bot.tradeOfferManager.createOffer(tradeURL).getUserDetails((err, me, them) => {
        const error = err?.message?.toLocaleLowerCase();
        if (error) console.log(`ERROR in checkForErrors for user: ${userID}: ${error}`);

        if (error?.includes('inventory privacy')) return resolve('private_inventory');
        if (error?.includes('is no longer valid')) return resolve('invalid_trade_url');
        if (!options.checkTradeBan) return resolve('');
        if (them?.escrowDays > 0) return resolve('steam_guard_not_activated');
        if (them?.probation) return resolve('trade_ban');

        return resolve('');
      });

by the way, I 100% know this is a bad code. but i don't know how else should i do this. (and also, it breaks from time to time and i have to hotfix it. it's broken now and I just want to do it properly, once and for all)

 

  • 1 month later...

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...