Help me make this command inclusive

I saw this command to make an counter for ppl in the stream to tally up boys and girls. I tried to make another variable to include others but I can not figure it out. Can you please help. Im am trying to code this using nightbot.

Here is the orginal

$(eval a=$(urlfetch$(1));a=$(urlfetch json;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(PRIVATETOKEN)){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 is mine trying to include others

$(eval a=$(urlfetch$(1));a=$(urlfetch json;b=a.match(/~B~/g);b=b!=null?${b.length} man:0 man;c=a.match(/~G~/g);c=c!=null?${c.length} woman:0 woman;o=a.match(/~X~/x);o=o!=null?${o.length} other:0 other;if($(1).includes(PRIVATETOKEN)){d=$(3)==boys?b:c:x;$(user) ${d} have joined this stream. Cheers $(3) squad!;}else{$(user) ${b} and ${c} and ${x} are here.;})

Hey @AlmghtyBLAIR!

Can you link the topic you’re referring to?
Also, if you could add four spaces before the code in your post that would help as the forum will format it as code, the previous line must be empty too (you can edit your post for that).

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