This is the same discord bot I've asked about in the last question I posted here, and I want to add a simple dice rolling function that doesn't take up multiple messages so I don't spam the server I'm in.
So far, I have the barebones code for the dice roller itself working here:
if (message.content.toLowerCase().includes("rei!d100")) {
var response = [Math.floor(Math.random() * ((100 - 1) + 1) + 1)];
message.channel.send(response).then().catch(console.error);
}
And as of right now it just spits out the number like
96
which is... very out of character for this bot I've given so much personality. What I want is for there to be text before and after the number it spits out, like so.
You got... 96!
If I put something like this into the code it has partially the same effect, it just sends really awkwardly and in two different messages, which isn't what I want.
if (message.content.toLowerCase().includes("rei!d100")) {
message.channel.send("You got...");
var response = [Math.floor(Math.random() * ((100 - 1) + 1) + 1)];
message.channel.send(response).then().catch(console.error);
}
Any help troubleshooting is appreciated! Thanks!