live-bot
Version:
With this module you can make an online bot to response the messages like an telegram-bot 🤖
20 lines (18 loc) • 519 B
JavaScript
function on(obj='start',sup='You dont set the response'){
sername.post('/Live-Bot/Api/',function(req,res){
if(req.body.data == obj){
res.setHeader('Access-Control-Allow-Origin', '*');
res.json({text:sup})
}
})
}
function notfound(obj='pic'){
sername.post('/Live-Bot/Api/',function(req,res){
res.setHeader('Access-Control-Allow-Origin', '*');
res.json({text:obj})
})
}
module.exports = {
on:on,
notfound:notfound
};