I need help with the nightbot counter function which i recently discovered a streamer using it. I want to add a counter if someone says ns which basically means nice .shot. So if he says ns, there is a message displayed by nightbot that says, "the streamer has hit 89(this is a variable number which changes everytime someone types ns in my chat) nice shots". Someone please help me out with the code that i should use in my nightbot commands. Thanks
Nightbot counter function for gaming channel
4 replies
here u go...
js!addcom ns $(channel) has hit $(count) nice shots!
tho, i can't remember if that shows the name in lowercase... if it does, this will get the display name...
js!addcom ns $(twitch $(channel) "{{displayName}}") has hit $(count) nice shots!
oh, and if a command called ns already exists, use "!editcom" instead of "!addcom"
!addcom ns $(twitch $(channel) "{{displayName}}) has hit $(eval var x = Math.ceil(Math.random()*100);if (x >= 90) {${x}% nice shots;}else if(x >= 70){${x}%,*I'd say between 70 and 89*;}else if (x >= 60) {${x}% *I'd say between 60 and 69*;}else if (x >= 10) {${x}% *I'd say between 10 and 59*;}else {${x}% *I'd say under 10*;})
Change the italicized text to what you want to say in that range