V
V
vankavorobyev12021-01-04 09:36:58
In contact with
vankavorobyev1, 2021-01-04 09:36:58

Why is the bot on VKontakte not responding to messages after adding the database?

After adding the database, the bot stopped responding to messages, specifically after this command:

vk.updates.use(async (message, next) => {
if(message.type == 'message' && (message.isOutbox || message.senderId < 0)) return;
if(message.senderId === undefined || message.senderType != 'user') return;
console.log(`${message.senderId}: ${message.text}`);
let user = users.accounts[message.senderId];
//registracia ecli akkaynt ne zaregestrirovan
if(user === undefined) {
users.accounts[message.senderId] = {
money: 5,
right: 1
}
return message.send( `
You have successfully registered in the bot system!
Your personal ID - ${message.senderId}`);
}
});

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question