taking into account that !winner returns a random user from the chat,
How can I create a similar command to select a random user from the chat without having to resort to an external api?
Does anyone know how the default !winner command works?
Hey @Zesty Pufferfish!
The default !winner command works by collecting the usernames of those who spoke within the last 5 minutes, and when it's called it picks someone at random from that list.
Nightbot could have a $(randomuser) variable that'd essentially do the same, but it doesn't exist as of now.
There used to be a way to get a random user with an external API, but it was shut down due to Twitch changing the rules to access the endpoint.