A command that chooses from a list in order, not random?

Asked Sep 5, 2024·3 replies·Last activity 1 year ago·Open in Discord ↗
Archived from the original community forum
Things may have changed since it was written. Still stuck? Ask the community on Discord.

Hi everyone,
I am new to nightbot. I currently do trivia on my streams and have people join by typing !jointrivia. However, it assigns the team randomly (purple or blue team) those are the only two on the list. So sometimes Purple team always has significantly more people assigned than the blue team... vice versa.

I'm looking for a way for when someone uses the command it gives them the next team color on the list (like back and forth between purple and blue).

I hope I am making sense. Thank you all so much!

3 replies

You're command could be like this:

$(eval
C = "$(count)";
(C % 2 === 0)
?"You are in the purple team"
:"You are in the blue team"
)
Fleet Bee said:
```
$(eval
C = "$(count)";
(C % 2 === 0)
?"You are in the purple team"
:"You are in the blue team"
)
```

thank you so much!!! it worked!!!