Last active
November 5, 2020 12:37
-
-
Save chavychaze/b16994afc4a4549f903a830a8f3e933a 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 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