Greetings to all. I'm a newbie using this repository and javaScript. I was investigate and manipulating a lot of projects to obtain some knowledge to create basic things. My question is this:
How can i get recent games of the user? I don't understand how the get a response from the event 'matchList'. I did a lot of things but no one make sense and end in more confusion. If someone can guide me I will be grateful.
const steam_user = require("steam-user");
const global = require("globaloffensive");
const chalk = require("chalk")
var client = new steam_user();
var csgo = new global(client);
let login = 'account';
let password = 'pass';
client.logOn({
"accountName": login,
"password": password
});
client.on('loggedOn', function() {
console.log("Logged into Steam");
client.setPersona(steam_user.EPersonaState.Invisible);
client.gamesPlayed(730);
});
client.on('error', function(a) {
console.log(a);
});
csgo.on('debug', console.log);
csgo.on("connectedToGC", function() {
if ( csgo.haveGCSession ) {
csgo.requestPlayersProfile(steamID, function(data) {
console.log(chalk.green(JSON.stringify(data, null, 3))); //working!
csgo.requestRecentGames(steamID)
csgo.on('matchList',(match,data) => {
//I don't understand what to do here.
});
process.exit();
})
}
})
Greetings to all. I'm a newbie using this repository and javaScript. I was investigate and manipulating a lot of projects to obtain some knowledge to create basic things. My question is this: How can i get recent games of the user? I don't understand how the get a response from the event 'matchList'. I did a lot of things but no one make sense and end in more confusion. If someone can guide me I will be grateful.