$(eval a=`$(urlfetch https://twitch.center/customapi/addquote?token=$(1))`;a=`$(urlfetch json https://twitch.center/customapi/quote/list?token=PUBLIC_TOKEN)`;b=a.match(/~B~/g);b=b!=null?`${b.length} boys`:`0 boys`;c=a.match(/~G~/g);c=c!=null?`${c.length} girls`:`0 girls`;if(`$(1)`.includes(`PRIVATE_TOKEN`)){d=`$(3)`==`boys`?b:c;`$(user) ${d} have joined this stream. Cheers $(3) squad!`;}else{`$(user) ${b} and ${c} are watching this stream. Use !boy or !girl to join your squad.`;})
You can set up a command which triggers every 30 uses like so:
!addcom -cd=5 lag $(eval $(count)%30==0?`Guys refresh!`:` `)
However Nightbot can only detect the word “lag” being said in chat as fast as once every 5 seconds. This will not work very well if you have many users spamming “lag” in chat.
I set up !bgreset below. Replace the private token:
!addcom -ul=mod !bgreset $(eval a=`$(urlfetch https://twitch.center/customapi/delquote?token=PRIVATE_TOKEN&clear=1)`;`$(user) has cleared the viewer list.`)
Hey!
Two questions-
If I need to change total counts then I need to replace 30?
Also, I have few more commands which I want to work under the same condition, to make them work is this the syntax -: $(eval $(count)%Number==0?**Message**:)
And suppose user lv of command is a subscriber, and if any other random guy will try to use command, can nightbot message him saying you need to be a subscriber(or whatever is req user lv) to use commands?
The “lag” command is set up such that Nightbot says the message every 30 uses (30, 60, 90, etc). To change how many times the command must be used before Nightbot says the message, just change the number.
If a command is set to a certain level (subscribers for example) then the command will never respond to any user below subscriber, and it’s not possible to set up the command such that Nightbot will give an alternate response to the user.
$(eval a=`$(urlfetch https://twitch.center/customapi/addquote?token=$(1))`;a=`$(urlfetch json https://twitch.center/customapi/quote/list?token=PUBLIC_TOKEN)`;b=a.match(/~B~/g);b=b!=null?`${b.length} boys`:`0 boys`;c=a.match(/~G~/g);c=c!=null?`${c.length} girls`:`0 girls`;if(`$(1)`.includes(`PRIVATE_TOKEN`)){d=`$(3)`==`boys`?b:c;`$(user) ${d} have joined this stream. Cheers $(3) squad!`;}else{`$(user) ${b} and ${c} are watching this stream. Use !boy or !girl to join your squad.`;})
this commands have more than 400+ characters and I am not able to add in nightboard dashboard
Looks like you’re adding the command on YouTube. YouTube commands have a 200 character limitation as opposed to Twitch’s 500 character limit. Not sure how I can edit the command response to fit within the YT limit.
I’ve tried rewriting !bg such that I can store as much $(eval) code as I can in a pastebin so as to fit the command in the 200 char limit, but I’ve had no luck since the 2 $(urlfetch)’s used to add to and read off the list leave very little room for anything else.
Rewritten command responses for !boy, !girl, and !bg to fit within the 200 character limit. Remember to set !boy and !girl as aliases of !bg, and replace PUBLIC_TOKEN with your public token and PRIVATE_TOKEN with your private token:
!boy:
addquote?token=PRIVATE_TOKEN$(eval `$(urlfetch https://twitch.center/customapi/quote?token=PUBLIC_TOKEN&data=-$(user)-)`.includes(`-$(user)-`)?`&data=-$(querystring $(user))-|~B~ Y`:` N`) boys