mirror of
https://github.com/FranP-code/shopping-discord-bot.git
synced 2025-10-13 00:22:44 +00:00
refactoring and adding limit command option
This commit is contained in:
5
scripts/getRandomElementFromArray.js
Normal file
5
scripts/getRandomElementFromArray.js
Normal file
@@ -0,0 +1,5 @@
|
||||
function getRandomElementFromArray(arr) {
|
||||
return arr[Math.floor((Math.random() * arr.length))];
|
||||
}
|
||||
|
||||
module.exports = getRandomElementFromArray;
|
||||
Reference in New Issue
Block a user