Answer the question
In order to leave comments, you need to log in
How to add new item to json in node js?
There is this code:
vk.updates.on('message', async (next, message) => {
if(message.isUser == 0) return;
for(i=0; i < users.length;i++){
if(next.senderId == users[i].id) return message();
}
users.push({
id: next.senderId,
bot_id: users.length,
tag: 'Пользователь',
ban: false,
mention: true,
balance: 100000,
admin_level: 0,
exp: 0,
lvl: 0,
kvest: 0,
test: 0,
business_lvl: 0,
job_level: 1
});
saveUsers();
return message();
});
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