if (msg.message.text.startsWith("/dostups")) {
if (await isAdmin(msg)) {
let sql = db.run('select dostuplvl, VKid from dostups')
console.log(sql.toString())
messagesend(msg.message.peer_id, 'info in console')
} else {
notmessage();
}
}
let sql = 'select dostuplvl, VKid from dostups';
db.all(sql, [], (err, rows) => {
if (err) {
throw err;
}
rows.forEach((row) => {
console.log(row)
messagesend(msg.message.peer_id, '🚫Пользователь: vk.com/id' + row.VKid + '🚫\n 🚫Уровень доступа: ' + row.dostuplvl);
});
});