showing results for - "how to make random responses"
Giorgio
13 Oct 2018
1//I USE THIS IN DISCORD.JS V12. OTHER THINGS MAY NEED OTHER CODE.
2const replies = ['reply1', 'reply2', 'reply3']; //Extend this if you want more messages.
3const result = Math.floor(Math.random() * replies.length); //This will choose a random response.
4//Use ${replies[result]} at your message if you want to add it to something else.
5message.channel.send(`${replies[result]}`); //You can even change text around it, pretty cool.