text += (index + 1 + ". " + (doc.from.username || doc.from.first_name) + " : " + doc.text + "\n");
}
});
text = text || "Nothing";
cbq.message.editText(text);
});
}
else if (cbq.data == "next") {
findMention.nextMessage(function(docs){
messages = docs;
var text = "";
docs.forEach(function(doc, index) {
if (doc.text) {
text += (index + 1 + ". " + (doc.from.username || doc.from.first_name) + " : " + doc.text + "\n");
}
});
text = text || "Nothing";
cbq.message.editText(text);
});
}
});
}();
gen.next();
},"查看有哪些訊息提到我");
bot.start();