How to use the steam-user.EResult 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 / lib / client.js View on Github external
sessionReplaceCount++;

        if (sessionReplaceCount > 0) {
            log.warn('Detected login session replace loop, stopping bot...');
            handlerManager.getHandler().shutdown(err, true);
            return;
        }

        log.warn('Login session replaced, relogging...');

        require('app/login')(null, function (err) {
            if (err) {
                throw err;
            }
        });
    } else if (err.eresult === SteamUser.EResult.LoggedInElsewhere) {
        log.warn('Signed in elsewhere, stopping the bot...');
        handlerManager.getHandler().shutdown(err, true);
    } else {
        throw err;
    }
}
github antigravities / Steamcord / index.js View on Github external
steam.joinChat(mc[1], (res) => {
					if( res != Steam.EResult.OK ) return webhook.send("Could not join that chat room: " + resolveCode(Steam.EResult, res));
				});
			} catch(e){
github Nicklason / tf2-automatic / lib / client.js View on Github external
function errorEvent (err) {
    if (err.eresult === SteamUser.EResult.LogonSessionReplaced) {
        sessionReplaceCount++;

        if (sessionReplaceCount > 0) {
            log.warn('Detected login session replace loop, stopping bot...');
            handlerManager.getHandler().shutdown(err, true);
            return;
        }

        log.warn('Login session replaced, relogging...');

        require('app/login')(null, function (err) {
            if (err) {
                throw err;
            }
        });
    } else if (err.eresult === SteamUser.EResult.LoggedInElsewhere) {