Jump to content


Photo

SteamID object generated with node-steamid throws [Error: Failed to set new primary group.] for primaryGroup in editProfile

node.js node-steamcommunity

Best Answer Jack , 12 January 2018 - 02:38 PM

I've now realized that method only sets that group as the primary one, doesn't join it. Which you obviously have to do prior.

Go to the full post


  • Please log in to reply
1 reply to this topic

#1 Jack

Jack

    Member

  • Member
  • PipPip
  • 10 posts

Posted 12 January 2018 - 02:22 PM

I got the SteamID for a group from `<groupID64>` on the page like the internet told me: https://steamcommuni...slistxml/?xml=1

 

SteamID returns:

SteamID { universe: 1, type: 7, instance: 0, accountid: 5921375 }

7 is `CLAN`, so it appears to be working correctly. However:

const SteamCommunity = require('steamcommunity');
const community = new SteamCommunity;


const SteamID = require('steamid');
const group = new SteamID('103582791435442783');


community.login({
  'accountName': <username>,
  'password': <password>
}, function(err, user) {
  if (err) {
    console.log(err);
  }


  community.editProfile({
    'name': <name>,
    'summary': <summary>
    'customURL': <URL>,
    'primaryGroup': group,
    'realName': '',
    'country': '',
    'state': '',
    'city': '',
    'background': '',
    'featuredBadge': ''
  }, function(err) {
    if (err) {
      console.log(err);
    }
  });
});

"[Error: Failed to set new primary group.]"

 

If you generate `group` with another SteamID64 like a profile's it doesn't throw an error, but it obviously also doesn't do anything.


Edited by Jack, 12 January 2018 - 02:28 PM.


#2 Jack

Jack

    Member

  • Member
  • PipPip
  • 10 posts

Posted 12 January 2018 - 02:38 PM   Best Answer

I've now realized that method only sets that group as the primary one, doesn't join it. Which you obviously have to do prior.


Edited by Jack, 12 January 2018 - 02:38 PM.






Also tagged with one or more of these keywords: node.js, node-steamcommunity

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users