Need help for random viewer picker


#1

I need help with a youtube random viewer picker for maybe a roleplay or Murder game.


#2

You can use the Nightbot Giveaway system or the !winner command to pick a random user in chat.


#3

Is there a way to make it in a command? like $(user) killed $(random user) and stole $(eval Math.floor((Math.random() * 100) + 1)) gold coins.


#4

Currently not, there is no random user variable/API for Youtube yet.


#5

You can build a API for get all users and randomize one!


#6

That’s what I was trying to say, is there an API for a YouTube random viewer picker?


#7

Youtube has no way to get a list of people watching the stream. So that only way to make it random is by collecting the users who’ve chatted in the past 15 minutes, which is what Nightbot does.


#8

Do you know how to call that variable or access it?


#9

There is no variable you can access to achieve this. The only built in way is through the default !winner command.


#10

Is there an API that can improvise?


#11

As stated above:

Until Youtube creates an API there is no way to get a list of users.


#12

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