Created
January 2, 2017 16:30
-
-
Save ConnorMcF/29d3682a26651144911b2b7e954e2266 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const logOnOptions = { | |
accountName: 'XXX', | |
password: 'XXX', | |
}; | |
const SteamUser = require('steam-user'); | |
const client = new SteamUser(); | |
SteamUser.prototype.setPersona = function(state, name) { | |
this._send(SteamUser.EMsg.ClientChangeStatus, { | |
"persona_state": state, | |
"persona_state_flags": 4, | |
"player_name": name | |
}); | |
}; | |
client.logOn(logOnOptions); | |
client.on('loggedOn', () => { | |
client.setPersona(SteamUser.Steam.EPersonaState.Online); | |
console.log("Steam gold, too? :^)"); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment