How to retrieve Overwatch stats through Nightbot

Hello! I really love this API, thank you for it. I was curious about if I was able to change the highlight color or not, though? When using Twitch’s nightmode, the White-on-black (when it calls back to whichever user made the command), is a little harsh on the eyes.

Is there any way to allow for custom coloring?

Nightbot/customapi’s have no control over twitch’s coloring. That’s on twitch’s end.

Thank you for the speedy reply! Appreciate it.

Hello,
Would love to know if some of the new heroes work with this command?
For example Sombra or Orisa
If they do not, would you let me know when they will be added?

thanks,
PT

@PURPLETRON Both champions should work, just put the champion name in front of the stat you would want to check, forexample: sombrakd, orisagames.

1 Like

Hi there, is there a way to make this work with with streamlabs? I see the ankhbot command generator but it doesn’t seem to be working with the new streamlabs. Anyways, great project! it would be awesome for a channel I mod on twitch <3

Heya since this is the Nightbot forums, would you mind contacting me on Twitter (@gerhardoh).

If I were to only want this to show one specific command (skill rating to be specific), how would I edit the link?

You replace the $(querystring) with the stat you want to show, do you want a command for a specific user, or just a command that people can check their skillrating?

Command for one specific user:
!commands add !skillrating -cd=5 -ul=everyone $(urlfetch https://2g.be/twitch/Overwatch/command/query=skillrating xgerhard xbox)
Usage: !skillrating
Nightbot: Skillrating is…

Command for people to check their skillrating:
!commands add !skillrating -cd=5 -ul=everyone $(urlfetch https://2g.be/twitch/Overwatch/command/query=skillrating%20$(querystring)&defaultconsole=xbox)
Usage: !skillrating xgerhard xbox
Nightbot Xgerhard’s skillrating is…

@xgerhard

Is there a way to get “numbers only” from overwatch stats? right now, my command is:

$(urlfetch https://2g.be/twitch/Overwatch/command/query=skillrating%20NPC-XXXX%20pc&channel=Online_NPC&hideBnetID&User=$(touser)) on PC and $(urlfetch https://2g.be/twitch/Overwatch/command/query=skillrating%20Online-NPC%20ps&channel=Online_NPC%20ps&channel=Online_NPC&User=$(touser)) on PS4"

and the output is messy.

[:heart:] Online_NPC: NPC’s Skill Rating: 2,202 [Gold] (No rank, Top 8%). on PC and [:heart:] Online_NPC: Online-NPC’s Skill Rating: 2,687 [Platinum] (No rank, Top 4%). on PS4

I’d like the command support a &numbersonly to output something clean like:

NPC’s Rank is 2,202 [Gold] on PC and 2,687 [Platinum] on PS4.

Hiding the full ID of my PS4 account and all that other stuff except the numbers/medal-rank. (the rest of the text is pre-formatted in the command response.)

Heya, try adding &notext&hideRanks at the end of the url.

edit, forgot the ranks :slight_smile:

1 Like

thanks!
now this:

NPC’s $(urlfetch https://2g.be/twitch/Overwatch/command/query=skillrating NPC-XXXX pc&hideBnetID&notext&hideRanks) on PC and $(urlfetch https://2g.be/twitch/Overwatch/command/query=skillrating Online-NPC ps&notext&hideRanks) on PS4

returns this:

NPC’s Skill Rating: 2,202 [Gold]. on PC and Skill Rating: 2,687 [Platinum]. on PS4

perfect!

1 Like

Yo, is there a way that when viewers type for example !overwatch skillrating, that the skillrating of the streamer (me) is displayed, without typing the name?

Heya! Yes you can set the command to always use your name, this however will stop the users from tracking their own stats.

Example:
!commands add !overwatch -cd=5 -ul=everyone $(urlfetch https://2g.be/twitch/Overwatch/command/query=$(querystring) xgerhard xbox)

Replace xgerhard xbox with the desired username & platform. For every command you do now, the stats from that user will be shown.

Is the bot currently broken? I cant seem to get the command to work for any PC players…

It seems to work for me, however the data resource is a bit slow, I’ll contact them. If a command fails (Error Connecting To Remote Server) and you wait a couple of seconds, it usually works instantly the second time you run it.

When ever I type my gamertag it doesn’t work, I even went to there website to try it and linked my xbox account but it still isn’t showing up. I am on EU if that means anything

Hiya, I would need your gamertag to see what’s going on.

i have a little problem, i have used the command but i just says “Sorry, an error has occured, please try again.” and ive tried it multiple times, refresh the site but it doesnt work… what should i do?

Heya, could you send me your username / platform so I can debug what’s going wrong, I tried a couple of accounts which seem to work fine.