This commit is contained in:
@ -13,7 +13,6 @@ const commandHandle = {
|
||||
};
|
||||
|
||||
async function randomCook(text, data) {
|
||||
logger(text, data.type, data.sender.id, data.sender.group.id);
|
||||
const limit = Number.parseInt(text) > 0 ? Number.parseInt(text) : 5;
|
||||
const recipeList = await getRandomRecipe(limit);
|
||||
logger(JSON.stringify(recipeList));
|
||||
|
@ -3,7 +3,7 @@ export function genRecipeMessage(recipeList, header, footer) {
|
||||
|
||||
for (let recipe of recipeList) {
|
||||
textList.push(
|
||||
`吃${recipe.name}\n准备材料:${recipe.stuff}\n使用厨具:${recipe.tools}\nhttps://www.bilibili.com/video/${recipe.bv}`,
|
||||
`吃${recipe['name']}\n准备材料:${recipe.stuff}\n使用厨具:${recipe.tools}\nhttps://www.bilibili.com/video/${recipe.bv}`,
|
||||
);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user