export function genRecipeMessage(recipeList, header, footer) { const textList = []; for (let recipe of recipeList) { textList.push( `${recipe.name}\n材料:${recipe.stuff}\n厨具:${recipe.tools}\nhttps://www.bilibili.com/video/${recipe.bv}`, ); } if (header) { textList.unshift(header); } if (footer) { textList.push(footer); } return textList.join('\n \n'); }