Command that chooses a random person in chat

Asked May 23, 2020·3 replies·Last activity 6 years 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.

Hey, I've seen some streamers that have commands that will randomly select a person in chat and wanted to know how i might do it?

i.e.
!throw

Nightbot: "(Person who did the command) threw a ball at (Random person in chat)!"

How would be the best way to go about this?

Thank you!

3 replies

Hey @Jovial Parrot!

Assuming you stream on Twitch, here's a solution:

$(user) threw a ball at $(urlfetch https://2g.be/twitch/randomviewer.php?channel=$(channel))!

Is possible the command select nighbot as well?

Yes, is that an issue?

If you want to filter out Nightbot or $(user) from the command, have a look at this:
(link expired)