const VkBot = require('node-vk-bot-api');
const Session = require('C:/Users/igago/Desktop/newBotVk/node_modules/node-vk-bot-api/lib/session');
const Stage = require('C:/Users/igago/Desktop/newBotVk/node_modules/node-vk-bot-api/lib/stage');
const Scene = require('C:/Users/igago/Desktop/newBotVk/node_modules/node-vk-bot-api/lib/scene');
const bot = new VkBot('');
const session = new Session();
const scene = new Scene('check',
(ctx) => {
ctx.scene.next();
ctx.reply('Введите ник');
},
(ctx) => {
ctx.session.name = ctx.message.text
ctx.scene.next();
ctx.reply('Подождите...');
},
(ctx) => {
ctx.scene.leave();
ctx.reply(`Проверка завершена.\nНик: ${ctx.message.text}`);
});
const stage = new Stage(scene);
bot.use(session.middleware());
bot.use(stage.middleware());
bot.command('/check', (ctx) => {
ctx.scene.enter('check');
});
bot.startPolling();