Skip to content

Commit

Permalink
Fixing some mistakes on examples
Browse files Browse the repository at this point in the history
  • Loading branch information
GreepTheSheep committed Jan 10, 2022
1 parent 961b27d commit 6744c01
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions examples/officialCampaign.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
const TMIO = require('trackmania.io'),
client = new TMIO.Client();

client.campaigns.currentSeason().then(campaign=>{
client.campaigns.currentSeason().then(async campaign=>{
console.log('The actual official campaign is', campaign.name);
console.log('The image URL of this campaign is:', campaign.image);

console.log('Top 10 of this campaign:');
const leaderboard = await campaign.leaderboard();
leaderboard.forEach(top=>{
console.log(top.position, top.playerName, "with", top.points, "points")
console.log(top.position, top.playerName, "with", top.points, "points");
});
});

Expand Down
2 changes: 1 addition & 1 deletion examples/playerCOTD.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ client.players.get("26d9a7de-4067-4926-9d93-2fe62cd869fc").then(async player=>{
${player.name}'s COTD stats:
${cotd.count} Cup Of The Day played,
${cotd.stats.totalDivWins} wins in any division,
${cotd.stats.averageDivRank * 100}% average rank,
${(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},
`);
Expand Down

0 comments on commit 6744c01

Please sign in to comment.