Build basic Process code
This commit is contained in:
6
index.js
6
index.js
@@ -36,17 +36,17 @@ setInterval(()=>{
|
||||
}
|
||||
// contents - Now work on response
|
||||
if(contents.result.length>0){
|
||||
console.log(`Update:${JSON.stringify(contents.result)}`)
|
||||
//console.log(`Update:${JSON.stringify(contents.result)}`)
|
||||
// Ready to work on
|
||||
if(parameters.offset===null){
|
||||
parameters.offset = contents[0].update_id + 1
|
||||
parameters.offset = contents.result[0].update_id + 1
|
||||
}
|
||||
contents.result.forEach(e=>{
|
||||
if(e.update_id + 1 > parameters.offset)
|
||||
{
|
||||
parameters.offset = e.update_id + 1
|
||||
}
|
||||
console.log(e.update_id)
|
||||
//console.log(e.update_id)
|
||||
respond.call(e)
|
||||
})
|
||||
|
||||
|
Reference in New Issue
Block a user