CS:GO custom APIs

Nice idea!
Added the command and updated the docs at https://csgo-stats.net/tools/nightbot

Thank you for the feedback :slight_smile:

Looking for a better example of how to use the !rank command.
$(urlfetch https://csgo-stats.net/api/nightbot/rank/$(demnd)/YOURCUSTOMURL)
the bold part is where I am confused, is that my steam url like http://steamcommunity.com/profiles/76561198149238583/ ,or is it the csgo-stats.net url for my profile?

Sorry for the super late question, but I can’t find any other examples elsewhere unfortunately.

How do I remove the link in the response? there is a maximum of 400 characters, and I want to add several fetchurl in the same command

You can use Nightbot’s eval variable to remove the link.

Stats for a specific user
!stats

$(eval `$(urlfetch https://csgo-stats.net/api/nightbot/stats/$(channel)/YOURCUSTOMURL)`.replace(/ - .*/, ""))

Your watchers stats
!mystats [CUSTOMURL]

$(eval `$(urlfetch https://csgo-stats.net/api/nightbot/stats/$(channel)/$(1))`.replace(/ - .*/, ""))

Show your current inventory
!inventory

$(eval `$(urlfetch https://csgo-stats.net/api/nightbot/inventory/$(channel)/YOURCUSTOMURL)`.replace(/ - .*/, ""))

Your always up-to-date rank
!rank

$(eval `$(urlfetch https://csgo-stats.net/api/nightbot/rank/$(channel)/YOURCUSTOMURL)`.replace(/ - .*/, ""))

VAC status
!vac [steamname]

$(eval `$(urlfetch https://vac-check.com/api/$(channel)/$(1))`.replace(/ - .*/, ""))

Cool! Now I don’t have to worry about the link being posted several times in the same response Thanks! :smiley:

Thank you for the feedback.