Загрузка...

(Node js) How to add answer/question database to bot?

Thread in Node.js created by Lancaster Dec 9, 2018. 361 view

  1. Lancaster
    Lancaster Topic starter Dec 9, 2018 Быстро накачаться? - lolz.guru/threads/2538866/ 300 Nov 1, 2018
    Есть чат бот для вк, нужно как то добавить базу вопросов ответов отдельным файлом.
    скрипт бота:
    const express = require('express')
    const bodyParser = require ('body-parser')
    const { Botact } = require ('botact')

    const server = express()
    const bot = new Botact({
    token: ''
    confirmation: ''
    })
    bot.on(function (ctx) {
    ctx.reply('Ведутся работы над обновлением бота. С Ув. Команда BCL helper.', z1)
    console.log(ctx.body)
    })

    bot.command('Мой id', function(ctx) {
    ctx.reply('хз, я такое не умею')
    })

    server.use(bodyParser.json())

    server.post('/', bot.listen)

    server.listen(80)
     
Loading...
Top