此代碼讀&發送JSON文件的文件
我怎樣才能讓這段代碼爲功能,並呼籲在1號線?讓這對'向loop`一個功能
// sendAllDocument
var i,j,tempstring;
for (i=0,j=locale.keyboards[msg.text].document.length; i<j; i++) {
tempstring = locale.keyboards[msg.text].document[i];
bot.sendDocument(msg.chat.id, tempstring, opts);
}
你知道如何使一個for循環,但不是一個函數...? – Denny