K
K
kolya66662022-01-26 16:27:58
In contact with
kolya6666, 2022-01-26 16:27:58

How to make variables work in a command?

I use the NodeJS module vk-io vkcoin api

I made a command to get a repost bonus, but the variables do not work in it, that is,
they give 30k for a subscription and they are not credited to the user's balance

cmd.hear(/^(?:Бонус)$/i, async (message, bot) => {
return message.send("[] ~ Ты получил бонус за подписку в размере 30.000 vkc")
let user = message.user;
message.user.zapas.z3 += 2
message.user.balance += 30000

vk.api.groups.isMember({ 
group_id: 194310586, 
user_id: message.user.id }).then((response) => {
if(message.user.zapas.z3 > 1) return message.send(` ~ Ты уже получал бонус за подписку`);
if(response == 0) return message.send(`[] ~ Для получения бонус ты должен быть подписан`);

});
});

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Stas Ostrovsky, 2022-01-28
@Ostrovsky_Miroslav

Good evening, make sure the variables exist at all.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question