I don't know if I'm posting to the right place or what but I was wondering if someone could help me with a Nightbot command I want to make. I have the !uptime command and I have a !rage command which only retrieves one value. Now I'd like to combine the two into a command that would retrieve 5 or 6 different values (stages of rage in this situation) depending on what value !uptime would retrieve. So basically if I have been streaming for an hour !rage would say minimum but if for 5 hours it would say critical or something.
How is this possible? Someone pls help
Go to https://nightbot.tv/commands/custom and simply add these two commands
command : message : alias
!hour : $(eval var index = $(1); const options=["min","avg","max","babyRage"]; options[index] )
!rage : $(urlfetch https://beta.decapi.me/twitch/uptime/itsashawe)
: !hour
NOTE: Remember to use your channel name instead of mine (itsashawe). Make sure you add !hour
as alias in the !rage
command.
P.S.
I've used an api to make it simpler. The rage command calls the hour command which gets the hours, minutes and seconds. The rage command uses $(1)
i.e. the first argument i.e. the hour and uses it as an index to get values from options which you can change according to your use.