Commands Blocked


#1

!addcom !rank $(urlfetch http://kyuu.moe/extra/rankapi.php?channel=$(channel)&user=xoblivious&plat=steam)

When I put this command in to get my stats/ranks for a game (rocket league). Nightbot replies with Server commands other than /me are blocked.

I just used this command on my friends twitch chat and it is working for him but when I do it it is instantly blocked


#2

This is happening because your username is .. so the API returns the message ..'s current ranks | 1v1: Diamond II (964) | 2v2: Champion III (1385) | Solo 3v3: Unranked (1083) | 3v3: Champion II (1375)

Messages that start with . are interpreted as commands (like /me or /timeout)

So you need to either add a prefix to the command response, like this:

!addcom !rank Rocket League: $(urlfetch http://kyuu.moe/extra/rankapi.php?channel=$(channel)&user=xoblivious&plat=steam)

Or change your username to not start with .


#3

Thank you so much! I did the command you suggested and it worked. As for the username with … that was well over 6 months ago but the trackers/steam still register my username as … even though I changed it. but your solution still worked so thank you so much!


#4

In that case, if you want the command to show your new username, you can use Nightbot’s eval variable to replace .. with your new username, like this:

!addcom !rank $(eval `$(urlfetch http://kyuu.moe/extra/rankapi.php?channel=$(channel)&user=xoblivious&plat=steam)`.replace("..", "NEW USERNAME"))