You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
635 B
635 B
Get Player's COTD stats
const TMIO = require('trackmania.io'),
client = new TMIO.Client();
client.players.get("26d9a7de-4067-4926-9d93-2fe62cd869fc").then(async player=>{
const cotd = await player.cotd();
console.log(`
${player.name}'s COTD stats:
${cotd.count} Cup Of The Day played,
${cotd.stats.totalDivWins} wins in any division,
${(cotd.stats.averageDivRank * 100).toFixed(2)}% average rank,
The best division in overall was Div ${cotd.stats.bestOverall.division},
The best division in primary COTD was Div ${cotd.stats.bestPrimary.division},
`);
});