Skip to content

Instantly share code, notes, and snippets.

@kiwec
Created December 30, 2018 15:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kiwec/48dc3a12bd1b31064ad7037ca982cc37 to your computer and use it in GitHub Desktop.
Save kiwec/48dc3a12bd1b31064ad7037ca982cc37 to your computer and use it in GitHub Desktop.
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