fix
This commit is contained in:
parent
ed62a59117
commit
a44faf3c6e
@ -134,7 +134,7 @@ module.exports = function(){
|
|||||||
return event.reply("*No Tracking Yet*", {"parse_mode":"Markdown"});
|
return event.reply("*No Tracking Yet*", {"parse_mode":"Markdown"});
|
||||||
}else{
|
}else{
|
||||||
return db.set_v(event.chat.id,ids).then(res=>{
|
return db.set_v(event.chat.id,ids).then(res=>{
|
||||||
return get_tracking(res).then(res=>{
|
return get_tracking(ids).then(res=>{
|
||||||
var text = "*Tracking*\n\n";
|
var text = "*Tracking*\n\n";
|
||||||
for(var rr of res){
|
for(var rr of res){
|
||||||
text+=`*${rr.id}* (_${rr.date?rr.date:'Unknown'} - ${rr.loc?rr.loc:'Unknown'}_)\n${rr.status}\n\n`;
|
text+=`*${rr.id}* (_${rr.date?rr.date:'Unknown'} - ${rr.loc?rr.loc:'Unknown'}_)\n${rr.status}\n\n`;
|
||||||
@ -164,11 +164,10 @@ module.exports = function(){
|
|||||||
kb.push([bot.mkcb("Refresh","refresh","")]) ;
|
kb.push([bot.mkcb("Refresh","refresh","")]) ;
|
||||||
kb.push([bot.mkcb_close("Close"),bot.mkcb("Delete","del","")]);
|
kb.push([bot.mkcb_close("Close"),bot.mkcb("Delete","del","")]);
|
||||||
return db.get_v(event.chat.id).then(res =>{
|
return db.get_v(event.chat.id).then(res =>{
|
||||||
var ids = res;
|
if(res.length == 0){
|
||||||
if(ids.length == 0){
|
|
||||||
return event.editMessageText("*No Tracking Yet*", {"parse_mode":"Markdown"});
|
return event.editMessageText("*No Tracking Yet*", {"parse_mode":"Markdown"});
|
||||||
}else{
|
}else{
|
||||||
return db.set_v(event.chat.id,ids).then(res=>{
|
return db.set_v(event.chat.id,res).then(res=>{
|
||||||
return get_tracking(res).then(res=>{
|
return get_tracking(res).then(res=>{
|
||||||
var text = `*Tracking* (Updated: ${new Date().toLocaleString()})\n\n`;
|
var text = `*Tracking* (Updated: ${new Date().toLocaleString()})\n\n`;
|
||||||
for(var rr of res){
|
for(var rr of res){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user