Zyphon_22
Coder
Im making a discord bot currently and i was wondering on how to randomise messages on discord.js
the normal way
e.x.
[CODE lang="javascript" title="random"]const reply = ["reply1", "reply2"]
const choose_reply = [Math.floor(Math.random() * reply.length)];
console.log(choose_reply);
[/CODE]
this works in the console but it doesnt work when i run the bot
is there another way to randomise a message?
the normal way
e.x.
[CODE lang="javascript" title="random"]const reply = ["reply1", "reply2"]
const choose_reply = [Math.floor(Math.random() * reply.length)];
console.log(choose_reply);
[/CODE]
this works in the console but it doesnt work when i run the bot
is there another way to randomise a message?