Is it possible to select random user in yt chat

Asked May 17, 2025·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.

Is it possible to create a command to select a random user in a YouTube livestream using Nightbot?

3 replies

It isn't possible to select a random user because YouTube doesn't expose the list of users in chat. You could leverage the !winner command to select a random recent chatter, with the caveat it only includes recent chatters.

I’d also like to create a similar command, for example:
!happy — the user has 20% happiness
!size — the user is 150 cm tall

But Nightbot needs to mention the username of the person who triggered the command, and give random values within a defined range.
For example, if I set happiness between 1 and 100, and height between 120 and 200.
How can I do that, please?