Util.random.index() - shysolocup/noscord.js GitHub Wiki

randomly chooses an index from an array or object
type: Function

arguments:

  • object Array/Object

util.random.index([ "a", "b", "c" ]); // 2

util.random.index({ key1: "val1", key2: "val2", key3: "val3" }); // 1


⚠️ **GitHub.com Fallback** ⚠️