Created
December 30, 2018 15:22
-
-
Save kiwec/48dc3a12bd1b31064ad7037ca982cc37 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 SteamUser = require('steam-user'); | |
const GlobalOffensive = require('globaloffensive'); | |
const config = require('./config.js'); | |
const client = new SteamUser(); | |
const csgo = new GlobalOffensive(client); | |
csgo.on('debug', console.log); | |
client.on('error', console.error); | |
console.log('Logging in to Steam...'); | |
client.logOn({ | |
account_name: config.csgo_username, | |
password: config.csgo_password, | |
}); | |
client.on('loggedOn', res => { | |
console.log('Logged in to Steam as ' + client.steamID.getSteam3RenderedID()); | |
client.gamesPlayed([730]); | |
csgo.on('connectionStatus', console.log); | |
csgo.on('connectedToGC', () => { | |
console.log('Connected to GC!'); | |
// Never called | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment