NightDev Community Forums

I need help with ToUser command


#1

I am trying to set a funny and short command but I need nightbot to answer “a noob” if there is no $(Touser).
i have: $(user) sniped $(touser) from $(customapi http://2g.be/twitch/randomnumber.php?=defstart=1&defend=999)

I want it to answer: (User) sniped a noob from (random number) when the user doesnt mention somebody else.


#2

@daphai_tv

$(eval a=decodeURIComponent(`$(querystring)`);a=a?a:`a noob`;`$(user) sniped ${a} from ${Math.ceil(Math.random()*999)}`)

#3

@RokettoJanpu thank you so much. You are a legend.


closed #4

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.