Quadnite-Bot/commands/random.js

6 lines
139 B
JavaScript
Raw Normal View History

2019-02-10 20:28:28 +01:00
module.exports = (list = []) => (n = 1) =>
Array(n)
.fill(0)
.map(() => list[Math.floor(Math.random() * list.length)])
.join("\n");