Nightbot variables from random list / Invalid Variables

I gotten this to work successfully in stream elements

$(user) is $(random.pick ‘random1’ ‘Random2’ Random3’) $(user)

the list of “random” would be a bit longer but when I use this code it just says I have invalid variables. The other question I could ask is what is the valid way to input variables

StreamElements is not related to Nightbot in any way. Nightbot command variables are documented at https://docs.nightbot.tv/

To output a random item from a list, you may consider using $(eval) to execute some JavaScript code like so:

$(user) is $(eval a=[`random1`,`random2`,`random3`];a[Math.floor(Math.random()*a.length)]) $(user)

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