I have this love command:
$(eval if ("$(query)" == “Haga”) { var loveMessage = “The love you have for our streamer is endless!!”; } else { var loveMessage = “There is $(urlfetch https://beta.decapi.me/random/number/0/100)% <3 between $(user) and $(query)!”; } loveMessage; )
But it is case sensitive, i would like som help to get it to not be case sensitive
Where Haga is the name of the streamer iam helping
@robepower Make “$(query)” and “Haga” lowercase and compare those strings. Also you can use Math.random to get random numbers. Try this:
$(eval a=decodeURIComponent(`$(querystring)`);a.toLowerCase()==`haga`?`The love you have for our streamer is endless!!`:`There is `+Math.floor(Math.random()*101)+`% <3 between $(user) and `+a+`!`)
i edit the !love command so that it contains your answer?
Or should i have anything more?
iam kind of new to this custom commands stuff but i like to play around with it
so the command looks like this?
!commands edit !love $(eval a=decodeURIComponent($(querystring));a.toLowerCase()==haga?The love you have for our streamer is endless!!:There is+Math.floor(Math.random()*101)+% <3 between $(user) and+a+!)
?
sorry if i ask noob questions but as i said iam fairly new to this custom commands stuff,
But i apreciate all help i can get
!commands edit !love $(eval a=decodeURIComponent(`$(querystring)`);a.toLowerCase()==`haga`?`The love you have for our streamer is endless!!`:`There is `+Math.floor(Math.random()*101)+`% <3 between $(user) and `+a+`!`)