How to use the steam-user.EPersonaState function in steam-user

To help you get started, we’ve selected a few steam-user examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Nicklason / tf2-automatic / app / handler / index.js View on Github external
exports.onLogin = function () {
    if (exports.isReady()) {
        // We have relogged, set game and online
        this.gamesPlayed(package.name);
        this.setPersona(SteamUser.EPersonaState.Online);
    }
};
github antigravities / Steamcord / index.js View on Github external
steam.on("loggedOn", () => {
	steam.setPersona(Steam.EPersonaState.Online);
	console.log("Logged on to Steam.");
	ensureCommunityLoggedIn(() => {});
});
github frk1 / steamhourboostv2 / src / steamaccount.js View on Github external
.then(() => {
        this.client.setPersona(SteamUser.EPersonaState.Offline)
        this.client.gamesPlayed(this.games !== null ? this.games : [10, 730])
        return console.log(`${this.logheader()} Starting to boost games!`)
      })
      .catch(err => console.error(`${this.logheader()} ${err}`))
github MitchDizzle / ChatLogger.JS / src / chatlogger.js View on Github external
client.on('loggedOn', function(details) {
	console.log("Logged into Steam as " + client.steamID.getSteam3RenderedID());
    client.setPersona(SteamUser.EPersonaState.Invisible);
});
github frk1 / steamhourboostv2 / lib / steamaccount.js View on Github external
.then(() => {
        this.client.setPersona(SteamUser.EPersonaState.Offline)
        this.client.gamesPlayed(this.games !== null ? this.games : [10, 730])
        return console.log(`${this.logheader()} Starting to boost games!`)
      })
      .catch(err => console.error(`${this.logheader()} ${err}`))
github Revadike / steam-free-packages / requestFreeApps.js View on Github external
client.on("loggedOn", function(response) {
            console.log("Logged into Steam as " + client.steamID.getSteam3RenderedID());
            client.setPersona(SteamUser.EPersonaState.Online);
        });
        client.on("error", function(error) {
github antigravities / Steamcord / index.js View on Github external
friends.forEach((v) => {
						var id = friends.shift()

						try {
							nicks.push(emojiStrip(steam.users[id].player_name));
						} catch(e) {
							nicks.push(id);
						}

						steamids.push(id);

						if( steam.myFriends[id] == Steam.EFriendRelationship.Friend ){
							if( steam.users[id].persona_state == Steam.EPersonaState.Offline ) states.push("Offline");
							else if( steam.users[id].persona_state == Steam.EPersonaState.Online ) states.push("Online");
							else if( steam.users[id].persona_state == Steam.EPersonaState.Busy ) states.push("Busy");
							else if( steam.users[id].persona_state == Steam.EPersonaState.Away ) states.push("Away");
							else if( steam.users[id].persona_state == Steam.EPersonaState.Snooze ) states.push("Snooze");
							else if( steam.users[id].persona_state == Steam.EPersonaState.LookingToPlay ) states.push("Looking to Play");
							else if( steam.users[id].persona_state == Steam.EPersonaState.LookingToTrade ) states.push("Looking to Trade");
							else states.push("Offline");
						} else {
							if( steam.myFriends[id] == Steam.EFriendRelationship.RequestRecipient ) states.push("Added you as a friend");
							else if ( steam.myFriends[id] == Steam.EFriendRelationship.Ignored ) states.push("Blocked");
							else states.push("??");
						}
					});
github Nicklason / tf2-automatic / app / client.js View on Github external
client.on('loggedOn', function () {
        log.info('Logged onto Steam!');
        if (started) {
            client.gamesPlayed([require('../package.json').name, 440]);
            client.setPersona(SteamUser.EPersonaState.Online);
        }
    });
}
github Nicklason / tf2-automatic / app / handler / shutdown.js View on Github external
module.exports = function (err, done) {
    client.setPersona(SteamUser.EPersonaState.Snooze);

    listingManager.actions.create = [];

    if (listingManager.ready !== true || (listingManager.listings.length === 0 && listingManager._processingActions !== true)) {
        checkFiles();
        return;
    }

    listingManager.listings.forEach((listing) => listing.remove());

    listingManager.on('actions', onActions);

    function onActions (actions) {
        if (actions.remove.length === 0) {
            log.debug('Done removing listings');
            listingManager.removeListener('actions', onActions);
github antigravities / Steamcord / index.js View on Github external
try {
							nicks.push(emojiStrip(steam.users[id].player_name));
						} catch(e) {
							nicks.push(id);
						}

						steamids.push(id);

						if( steam.myFriends[id] == Steam.EFriendRelationship.Friend ){
							if( steam.users[id].persona_state == Steam.EPersonaState.Offline ) states.push("Offline");
							else if( steam.users[id].persona_state == Steam.EPersonaState.Online ) states.push("Online");
							else if( steam.users[id].persona_state == Steam.EPersonaState.Busy ) states.push("Busy");
							else if( steam.users[id].persona_state == Steam.EPersonaState.Away ) states.push("Away");
							else if( steam.users[id].persona_state == Steam.EPersonaState.Snooze ) states.push("Snooze");
							else if( steam.users[id].persona_state == Steam.EPersonaState.LookingToPlay ) states.push("Looking to Play");
							else if( steam.users[id].persona_state == Steam.EPersonaState.LookingToTrade ) states.push("Looking to Trade");
							else states.push("Offline");
						} else {
							if( steam.myFriends[id] == Steam.EFriendRelationship.RequestRecipient ) states.push("Added you as a friend");
							else if ( steam.myFriends[id] == Steam.EFriendRelationship.Ignored ) states.push("Blocked");
							else states.push("??");
						}
					});