A
A
afoorr2020-07-28 22:04:34
JavaScript
afoorr, 2020-07-28 22:04:34

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

1 answer(s)
E
Elvis, 2020-07-28
@Dr_Elvis

you should not produce topics
How to put buttons on a VK bot message?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question