Skip to content

Instantly share code, notes, and snippets.

@chavychaze
Last active November 5, 2020 12:37
Show Gist options
  • Save chavychaze/b16994afc4a4549f903a830a8f3e933a to your computer and use it in GitHub Desktop.
Save chavychaze/b16994afc4a4549f903a830a8f3e933a to your computer and use it in GitHub Desktop.
const SteamUser = require("steam-user");
const GlobalOffensive = require("globaloffensive");
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({
accountName: "<account name>",
password: "<account password>"
});
client.on("loggedOn", res => {
console.log("Logged in to Steam as " + client.steamID.getSteam3RenderedID());
console.log(client); // returns SteamUser
client.requestFreeLicense([730]);
client.gamesPlayed([730], true);
csgo.on("connectionStatus", console.log);
csgo.on("connectedToGC", () => {
console.log("Connected to GC!");
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment