1.1.2 • Published 6 years ago

live-bot v1.1.2

Weekly downloads
2
License
ISC
Repository
github
Last release
6 years ago

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')

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

1.1.2

6 years ago

1.1.1

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago