This commit is contained in:
Cedric Hoelzl 2019-09-20 13:24:48 +02:00
parent deb7ad2c6f
commit b0d6d8daee

View File

@ -30,7 +30,13 @@ module.exports = function(url, cmds){
let options = { let options = {
url: this.url, url: this.url,
body:message, form:{
chat_id:message.chat.id,
user_id: message.from.id,
user_name: message.from.name,
message: message.text,
args: message.text_arg,
}
}; };
return new Promise((resolve,reject)=>{ return new Promise((resolve,reject)=>{
return request.get(options, function (err, response, body) { return request.get(options, function (err, response, body) {
@ -62,7 +68,7 @@ module.exports = function(url, cmds){
post_action : (bot,req,rep)=>{ post_action : (bot,req,rep)=>{
}, },
get_action : (bot,req,rep)=>{ get_action : (bot,req,rep)=>{
console.log(req.body); console.log(req);
rep.send({reply: "Beep Boop"}); rep.send({reply: "Beep Boop"});
//rep.send({msg:req.from.id}); //rep.send({msg:req.from.id});
}, },