Warzone Api Nightbot command

Asked Oct 31, 2021·1 reply·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.

Hello there,

I've found a topic regarding Warzone command's to check own stats which looks like this:

$(eval s=$(urlfetch json https://api.tracker.gg/api/v2/warzone/standard/profile/battlenet/elegipcio%23…).data.segments[1].stats; r=s.kdRatio.value; k=s.kills.value; d=s.deaths.value; w=s.wins.value; Wins: ${w} | Kills: ${k} | Deaths: ${d} | Kills/Deaths Ratio: ${r})

Now, my question is. . .

How do i make a command to check other peoples stats in chat.

Example, i'd like to add a command that everytime i input !check USERNAME#010239 it gives me back their stats.

Thanks alot !

1 reply

I’m fairly certain this will work:

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