Answer the question
In order to leave comments, you need to log in
ReferenceError: message is not defined What to do?
<//storage/emulated/0/bot/TEST/app.js:29
return message.send(`Вы зарегестрированны!`, keyboard(
^
ReferenceError: message is not defined
console.log('')
console.log('-------------------------------')
console.log(' vk-bot запущен.')
console.log(' Написан: ����')
console.log(' https://vk.com/����')
console.log('-------------------------------')
console.log('')
const { VK } = require('vk-io');
const { HearManager } = require('@vk-io/hear')
const vk = new VK({
token: ""
})
const commands = [];
setInterval(async () => { await saveAll(); }, 500);
const utils = {
pick: (array) => { return array[utils.random(array.length - 1)]; },
random: (x, y) => { return y ? Math.round(Math.random() * (y - x)) + x : Math.round(Math.random() * x); }
}
const keyboard = (object) => {
return {
keyboard:JSON.stringify({
one_time: false,
buttons: object
})
}
}
return message.send(`Вы зарегестрированны!`, keyboard(
));
const cmd = {
hear: (p, f) => {
commands.push([p, f]);
}
}
cmd.hear(/^(?: Удвоить Деньги )$/i, async(message, bot) =>{
return bot(` Вам нужно будет перейти и оплатить по ссылке`)
return bot(`Незабуть указать айди: ${context.senderId} в коментарии`);
});
cmd.hear(/^(?: Инфо )$/i, async(message, bot) =>{
return bot(`Инфо`);
});
cmd.hear(/^(?:Начать)$/i, async(message, bot) =>{
return bot(`Вы зарегестрированны!`);
});
vk.updates.start().catch(console.error)
Answer the question
In order to leave comments, you need to log in
Translate the error message in Google translator, and if it doesn’t become clear anyway, then forget it
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question