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.