koishi-plugin-ggcevo-game 1.0.20 → 1.0.22

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 +3 -2
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -1487,13 +1487,14 @@ ${achievementList.join("\n")}`;
1487
1487
  ctx.logger.error("SC2大厅监控失败:", error);
1488
1488
  }
1489
1489
  }, config.checkInterval * 1e3);
1490
- ctx.command("ggcevo/pk <user>", "发起玩家对战").alias("挑战").action(async (argv, user) => {
1490
+ ctx.command("ggcevo/pk [user]", "发起玩家对战").alias("挑战").action(async (argv, user) => {
1491
1491
  try {
1492
1492
  const session = argv.session;
1493
+ if (!user) return "缺少参数,请使用@指定对战玩家";
1493
1494
  const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
1494
1495
  if (!profile) return "您的 QQ 未绑定句柄。";
1495
1496
  const parsedUser = import_koishi.h.parse(user)[0];
1496
- if (!parsedUser || parsedUser.type !== "at") return "请使用@指定对战玩家";
1497
+ if (!parsedUser || parsedUser.type !== "at") return "格式错误,请使用@指定对战玩家";
1497
1498
  const targetUserId = parsedUser.attrs.id;
1498
1499
  let targetUsername = parsedUser.attrs.name || targetUserId;
1499
1500
  const [targetprofile] = await ctx.database.get("sc2arcade_player", { userId: targetUsername });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-ggcevo-game",
3
3
  "description": "星际争霸2游戏大厅咕咕虫-Evo地图专属插件",
4
- "version": "1.0.20",
4
+ "version": "1.0.22",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [