Answer the question
In order to leave comments, you need to log in
How to make buttons in a VK bot?
I am a beginner, can you please tell me what needs to be done so that the button dig coal appears along with the message dig coal
cmd.hear(/^(?:копать уголь)$/i, async (message, bot) => {
if(message.user.energy < 1) return bot(`вы сильно устали.
⚠ Энергия появляется каждые 5 минут!`);
let randugol = utils.random(16, 97);
message.user.energy -= 1;
message.user.opit += 1;
message.user.ugol += randugol;
saveUsers();
if(message.user.energy > 0) return bot(`+${randugol} угля.
Энергия: ${message.user.energy}, опыт: ${message.user.opit}`);
if(message.user.energy < 1) {
setTimeout(() => {
message.user.energy = 10;
}, 300000);
return bot(`+${randugol} угля.
Энергия закончилась. ⚠`);
}
});
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