live-bot

1.1.2Β β€’Β PublicΒ β€’Β Published

Live-bot

With this module you can make an online bot to response the messages like an telegram-bot πŸ€–

Example Of Live-bot

    chat.on('how are you','thanks')

Install

const express = require('express');
const app = express();
const chat = require('live-chat');
const bodyParser = require('body-parser')
    
 //install the πŸ‘† modules
   
//then set the main server variable name to this πŸ‘‡

global.sername = app;

//then if you want to tell the user when a error happend try this πŸ‘‡ 
//important to use this in  the end of your code
chat.notfound('Sorry ot found !!')
   

Usage

you have point the answers to your code like an telegram bot for example on this code πŸ‘‡ when user send hello the bot answer Hi

   chat.on('Hello','hi')

then response

How to work with this (Important)!!!

if you want recieve message from client you have send the message on the Address ** /Live-Bot/Api/ ** and your sended data should be in this format πŸ‘‡

json({ data : user input })

Then server response your request white this πŸ‘‡ format

json({text : response text })

Examples and more

for more examples and html template for live chat see my github or my website http://sina-farhadi.ir

Package Sidebar

Install

npm i live-bot

Weekly Downloads

4

Version

1.1.2

License

ISC

Unpacked Size

3.7 kB

Total Files

4

Last publish

Collaborators

  • e.rror.e