koishi-plugin-toram 2.0.3 → 2.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/index.js +2 -1
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -1106,6 +1106,7 @@ async function command_updateDishes(event, args) {
1106
1106
  case 1:
1107
1107
  const dishes = JSON.parse(checkResult.data["dishes"]);
1108
1108
  let push = true;
1109
+ event.logger.info(dishes);
1109
1110
  for (const dish of dishes) {
1110
1111
  if (dish.type === checkResult.data["type"]) {
1111
1112
  dish.level = Number(level);
@@ -1142,7 +1143,7 @@ async function checkArgs5(ctx, session, args) {
1142
1143
  newId = i;
1143
1144
  }
1144
1145
  const player = playerList.find((player2) => player2.qqOpenId === session.event.user.id);
1145
- return { code: 0, data: { id: newId, dishes: { type: filterType, level: toDishLevel(level), update: player.name } } };
1146
+ return { code: 0, data: { id: newId, dishes: [{ type: filterType, level: toDishLevel(level), update: player.name }] } };
1146
1147
  }
1147
1148
  return { code: 1, data: { id: filterPlayer.id, dishes: filterPlayer.dishes, type: filterType } };
1148
1149
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-toram",
3
3
  "description": "托拉姆物语小工具",
4
- "version": "2.0.3",
4
+ "version": "2.0.4",
5
5
  "contributors": [
6
6
  "青灯 <1874053520@qq.com>"
7
7
  ],