live-bot
v1.1.2
Published
With this module you can make an online bot to response the messages like an telegram-bot ๐ค
Downloads
6
Maintainers
Readme
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