X
X
xped7772021-04-17 22:23:04
Node.js
xped777, 2021-04-17 22:23:04

SyntaxError: Unexpected end of input how to fix?

What to do?

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

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question