Warzone custom API command Reply with Profile name and

Asked Sep 28, 2021·4 replies·Last activity 4 years ago·Open in Discord ↗
Archived from the original community forum
Things may have changed since it was written. Still stuck? Ask the community on Discord.

I have the warzone custom API command working but I was wondering how to get the nightbot response to be (user profile) has stats of ......

Also I can not for the life of me get HeadshotPCT to work either.

4 replies

1st- $(eval $(querystring).toLowerCase().replace(%20,/))

js
$(eval s=$(urlfetch json https://api.tracker.gg/api/v2/warzone/standard/profile/$(query)).data.segments[0].stats; r=s.kdRatio.value; k=s.kills.value; d=s.deaths.value; w=s.wins.value; `K/D: ${r} | Wins: ${w} | Kills: ${k} | Deaths: ${d}`)

i can help if you would like i have this command setup (edit) i just realized u wanted it to show user profile lmao sorry

$(eval s=$(urlfetch json https://api.tracker.gg/api/v2/warzone/standard/profile/$(query)).data.segments[0].stats; r=s.kdRatio.value; k=s.kills.value; d=s.deaths.value; w=s.wins.value; `$(s.data.platformInfo.platformUserHandle} has stats of: K/D: ${r} | Wins: ${w} | Kills: ${k} | Deaths: ${d}`)

Now I’m not sure that this is the username that you want but I think this should probably do what you want.