Answer the question
In order to leave comments, you need to log in
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
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question