node-pbot

1.0.2 • Public • Published

pBot (p-bot.ru) Node.js API

Russian language only for now.

This module mock-ups pBot site (http://p-bot.ru/) with puppeteer and provides simple class for interacting with bot.

For fun only

Usage

 
//Require module
const PBot = require('./index');
 
(async ()=>{
 
    //Create bot instance with new name "Mr. Potato"
    let pBot = new PBot('Mr. Potato');
    
    //Initialize instance
    await pBot.init();
 
    //Chatting with bot
    console.log(await pBot.say('Hello. My name is Maria')); //Hello. My name is Mr. Potato
    console.log(await pBot.say('How are you?')); //I'm fine
 
    await pBot.destroy();
})();

Dependencies (1)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i node-pbot

    Weekly Downloads

    0

    Version

    1.0.2

    License

    Apache-2.0

    Unpacked Size

    6 kB

    Total Files

    8

    Last publish

    Collaborators

    • lailune