Answer the question
In order to leave comments, you need to log in
How to make a timer in node js?
How to make it so that after the bot hears the command phrase, the countdown starts and after it expires, this or that action is performed for the VK bot on node js?
For example, here is the code:
cmd.hear(/^(?:click)$/i, async (message, bot) => {
if(message.user.settings.adm < 2) return bot (`You are not an administrator 2 and above rank`);
if(message.user.instrument < 2) return bot (`You don't have a mining tool`);
let rangelezo = utils.random(1, 3);
message.user.balance += rangelezo ;
return bot(`you got ${rangelezo}`);
});
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