Jump to content
McKay Development

friendsList event is not getting called


Ceddini

Recommended Posts

I think I've done everything right, but it still isn't reacting to the friendsList event.

 

const colors = require('colors');
const SteamUser = require('steam-user');
const { enablePicsCache } = require('steam-user/resources/default_options');

const clientOptions = {
    enablePicsCache: true,
    // autoRelogin: true,
};

const client = new SteamUser(clientOptions);

const logOnOptions = {
    accountName: process.env.STEAM_USER,
    password: process.env.STEAM_PASS,
};


client.logOn(logOnOptions);

client.on('error', (err) => {
    console.log(err);
});

client.on('loggedOn', () => {
    console.log('Logged into Steam'.green);
});

client.on('friendsList', () => {
    console.log('Friends list loaded'.green);
    console.log(client.myFriends);
});

client.on('appOwnershipCached', () => {
    console.log('All games have been cached'.green);

    const games = client.getOwnedApps(true);
    // console.log(games);
});

 

Both 'appOwnershipCached' and 'loggedOn' work beautifully, but somehow friendsList doesn't work.
Same goes for 'friendsGroupList' and 'friendPersonasLoaded'.

 

Does it have something to do with my privacy settings? I changed them and the issue remains.

Edited by Ceddini
Link to comment
Share on other sites

I don't know exactly why, but VSCode randomly imported it without me doing anything. Or at least I don't remember what I did.

I can normally trust vscode with the imports, so I left it alone. But I just removed it and it still works, so I guess vscode was just being a bit moody :lol:.

Link to comment
Share on other sites

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