Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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