@hieuzest/koishi-plugin-riichi-city 0.5.2 → 0.5.3

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.
package/lib/index.js CHANGED
@@ -79,6 +79,10 @@ ${config.extraHelp}`.trim();
79
79
  const l = await this.api.listLobbys();
80
80
  return Object.values(l).map((x) => `[${x.id}] ${x.name}`).join("\n");
81
81
  });
82
+ ctx.command("rc-dhs.info <cid:number>").action(async (_, cid) => {
83
+ const details = await this.api.enterLobby(cid);
84
+ return `${details.matchInfo.name} [${details.classifyID}]`;
85
+ });
82
86
  ctx.guild().command("rc-dhs.bind [cid:number]", { admin: { channel: true } }).userFields(["authority"]).channelFields(["rc-dhs/bind"]).action(async ({ session }, cid) => {
83
87
  const contestId = session.channel["rc-dhs/bind"];
84
88
  if (!cid && contestId) {
package/lib/lobby.js CHANGED
@@ -181,6 +181,8 @@ var RiichiCityLobby = class {
181
181
  } else {
182
182
  notFound.push(player.pattern);
183
183
  }
184
+ } else if (player.accountId) {
185
+ if (!Object.values(onlinePlayers).includes(player.accountId)) notFound.push(player.pattern);
184
186
  }
185
187
  }
186
188
  if (notFound.length) throw new PlayerNotFoundError(...notFound);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hieuzest/koishi-plugin-riichi-city",
3
3
  "description": "",
4
- "version": "0.5.2",
4
+ "version": "0.5.3",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [