Answer the question
In order to leave comments, you need to log in
Why does it say that you cannot send an empty message?
if(users[userid].isAdmin && message.replace(/@/g, "").replace(/\/профиль/g) && !message.startsWith(" ")) {
let user = client.users.find(user => user.username == "TESTname").id;
if(user.id != "undefined") {
var text = users[userid].name + ", профиль игрока " + users[user.id].name + "\n:dollar: Баланс " + users[user.id].money + "$\n:credit_card: В банке " + user.bank + "$\n:notebook_with_decorative_cover: Дата регистрации " + users[user.id].date;
return text;
} else {
var text = "«" + user.id + "»\n" + "«" + message.replace(/@/g, "").replace(/профиль/g) + "»";
return text;
}
}
UnhandledPromiseRejectionWarning: DiscordAPIError: Cannot send an empty message
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question