I have some code and it says:
if (data.text.split(" ")[0] == "mail") {
var mailto = data.text.split(" ")[1];
var message = data.text.split(" ")[2];
bot.getUserId(mailto, function (data) {
mailto = data.userid;
bot.pm(message, mailto);
});
}
Now, when I run this, it only sends the first word of my message, how can I make this say everything that is equal to and greater than 2? Thanks!
I have some code and it says:
Now, when I run this, it only sends the first word of my message, how can I make this say everything that is equal to and greater than 2? Thanks!