Discord random message help

hello, I’m new to programming and I want to know how to create a bot when you write !Random he answers I’m thinking and after 2 minutes he answers with a random response between Hello, Hi, Welcome.

1 Like

What language are you using (e.g. JavaScript, Python, C++)?

I’m using JavaScript

function RandomGreeting() {
    var Messages = ["Hello", "Hi", "Welcome"];
    // Above is the list of messages, you can edit that if you want
    return Messages[round(random(0, Messages.length))];

try pasting the above into your javascript, then detect when someone says !Random , and then run RandomGreeting();

As for detecting when someone says that… I have no clue… sorry :frowning: