Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

discord.js pick random from array

var answers = [
  "Hey",
  "Howdy",
  "Hello There",
  "Wotcha",
  "Alright gov'nor"
]

var randomAnswer = answers[Math.floor(Math.random() * answers.length)];

console.log(randomAnswer);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #pick #random #array
ADD COMMENT
Topic
Name
3+6 =