From ea06c9fd14433309d7001ee4f1c15845b9f0b2b4 Mon Sep 17 00:00:00 2001 From: mol Date: Thu, 14 Dec 2023 13:16:18 +0800 Subject: [PATCH] test --- plugins/cook/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/cook/index.js b/plugins/cook/index.js index 1e77ab1..44e2b2e 100644 --- a/plugins/cook/index.js +++ b/plugins/cook/index.js @@ -12,9 +12,9 @@ const commandHandle = { random: randomCook, }; -function randomCook(text, data) { +async function randomCook(text, data) { const limit = Number.parseInt(text) > 0 ? Number.parseInt(text) : 5; - const recipeList = getRandomRecipe(limit); + const recipeList = await getRandomRecipe(limit); const message = genRecipeMessage(recipeList, '给你推荐'); switch (data.type) {