2019-08-05 20:56:31 +05:30
|
|
|
// Obtain a sendMessage Object
|
2019-08-05 21:59:54 +05:30
|
|
|
const makeResponse = require('./makeResponse')
|
2019-08-05 20:56:31 +05:30
|
|
|
|
2019-08-05 21:59:54 +05:30
|
|
|
module.exports = (messageObject)=>{
|
|
|
|
if(makeResponse.canRespond(messageObject.text)){
|
|
|
|
console.log(makeResponse.getCommand(messageObject.text))
|
|
|
|
return {
|
|
|
|
"chat_id": messageObject.from.id,
|
|
|
|
"text": makeResponse.getPredicate(messageObject.text),
|
|
|
|
"parse_mode": "Markdown",
|
|
|
|
"reply_to_message_id": messageObject.message_id
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
else{
|
|
|
|
return null
|
2019-08-05 20:56:31 +05:30
|
|
|
}
|
2019-08-05 18:20:32 +05:30
|
|
|
}
|