CS:GO custom APIs

Asked Jun 10, 2015·25 replies·Last activity 8 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.

Hey folks,

we've developed some useful APIs for Nightbot which allow you to display your CS:GO stats directly in your chat!

Sample and always up to date docs: https://csgo-stats.net/tools/nightbot

Stats for a specific user
!stats

$(urlfetch https://csgo-stats.net/api/nightbot/stats/$(channel)/YOURCUSTOMURL)

Your watchers stats
!mystats [CUSTOMURL]

$(urlfetch https://csgo-stats.net/api/nightbot/stats/$(channel)/$(1))

Show your current inventory
!inventory

$(urlfetch https://csgo-stats.net/api/nightbot/inventory/$(channel)/YOURCUSTOMURL)

Your always up-to-date rank
!rank

$(urlfetch https://csgo-stats.net/api/nightbot/rank/$(channel)/YOURCUSTOMURL)

VAC status
!vac [steamname]

$(urlfetch https://vac-check.com/api/$(channel)/$(1))

Your own links and more information is available at https://csgo-stats.net/tools/nightbot

What do you think? Suggestions are highly appreciated!

25 replies

Is there a way to make it only show Awp Shots missed?

Sure, but we would have to develop this feature.

Hay there,

Having some problems with this command:

Your watchers stats
!mystats [steamname]

$(customapi http://csgo-stats.net/nightbot.php?user=$(1)&username=$(user))

My own stats are showing when only typing "!mystats", can you please give an example how to use this command? :-)

I managed to fix it, I forgot to include "[steamname]" as a part of the command. Thnx anyway for making the command :-)

I agree with this. It would let everyone know just how lucky you've gotten instead of how skillful you appear to be.

None of the commands are working for me they keep saying that no one has an account by that name

Can anyone help?

Screen_Shot_2016-03-04_at_8.27.08_AM.png

It still isn't working do you think you could come into the chat and help? I am in my channel's chat

senxai
this is posible
the site owner must make a script for that

Hey senxai,

I think you wrote the email? We built the API for checking the VAC status for a specific user, if anyone else want to use, here's the Nightbot command snippet:

VAC status
!vac [steamname]
$(urlfetch https://vac-check.com/api/$(channel)/$(1))

If anyone has another cool idea feel free to tell us, we're always open for new things! You can talk to us directly on Discord: http://discord.me/csgostatsnet

thank you so much! this did the trick!

Not for that website but for the Twitch API that is beneath that. What's the exact purpose?

just to check if they are twitch linked. maybe there's a way to make it work?

We can only check Twitch --> Steam, not the other way around.
So if someone e.g. enters !vac without a username as a parameter in the chat we could get his Twitch username, look up if he has his account connected to steam and query his vac status. Does this make sense?

Yea but twitchchecker requries a twitch username and checks if he's connected. Please can you help me make a command check so it checks the username like ... !check (username)

I connected your Bot to my friendlist to update my rank and my competetive rank. So i want to know if there is a possibility to show these ranks now via !rank command or something.

Thank you <3

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

**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(/ - .*/, ""))```
Ivory Mouse said:
$(eval $(urlfetch https://csgo-stats.net/api/nightbot/rank/$(channel)/YOURCUSTOMURL).replace(/ - .*/, ""))

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

Thank you for the feedback.

Didn't find your answer? The community is on Discord.

Ask on Discord