Nightbot fot lottery

how can i lot command example

!random 3 A,B,C,D,E,F,G

A,D,G?

Are you looking for a command that will take X amount of items out of the list after? The question isn’t really clear.

!commands add !random $(eval match=`$(query)`.match(/^(\d+) (.*)$/);if(match){n=parseInt(match[1]);c=match[2].split(",");if(n>c.length){"The number of choices to pick was larger than the number of choices"}else{for(i=c.length-1;i>0;i--){j=Math.floor(Math.random()*(i+1));x=c[i];c[i]=c[j];c[j]=x}c.slice(0,n).sort().join(",")}}else{"Enter the number of choices to pick, followed by a comma-separated list of choices"})

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