!leaderboard command for nightbot

I have a API which shows all the things I want in the command … but I’m facing difficulties in trying to show them in chat… Valorant ranked command? … i did read this thread but I still couldn’t figure it out … any help would be appreciated … I would paste the API link here but idk if its safe cuz it has riot actID in it.

Hiya, without any info we can’t help. What’s your command look like, or what API are you using?
If actID is your account ID that seems to me like thats just public available info.

2 Likes

@xgerhard Ok thanks for replying … i cant post the API link directly but i tried getting the leaderboard ranks using this command with nightbot … but it gives me "unexpected token ‘(’ error " … the API link is in this command

$[eval const api = `$(urlfetch json https://dgxfkpkb4zk5c.cloudfront.net/search/affinity/NA/queue/competitive/act/2a27e5d2-4d30-c9e2-b15a-93b8909a442c/gameName/root/tagLine/1288)`;var (putname) = api.players.find(e => e.puuid === "insertpuuid"); putname? putname is #${putname['leaderboardRank']} on the leaderboard with ${putname['numberOfWins']} Wins and a RR of ${putname['rankedRating']} : 'fail to get rank']

Thanks for sharing, you can use 3 backticks ``` to wrap your code inside a code block on the forums.
I slightly changed your command, try it out:

$(eval const api = $(urlfetch json https://dgxfkpkb4zk5c.cloudfront.net/search/affinity/NA/queue/competitive/act/2a27e5d2-4d30-c9e2-b15a-93b8909a442c/gameName/root/tagLine/1288); var putname = api.players.find(e => e.puuid === "xx"); putname ? `${putname.gameName} is #${putname.leaderboardRank} on the leaderboard with ${putname.numberOfWins} Wins and a RR of ${putname.rankedRating}` : 'fail to get rank')
1 Like

Thanks a lot for helping me out … it worked

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.