@hieuzest/koishi-plugin-riichi-city 0.4.6 → 0.4.7

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/api.d.ts CHANGED
@@ -95,7 +95,7 @@ export declare class RiichiCityApi {
95
95
  limit?: number;
96
96
  skip?: number;
97
97
  }): Promise<types.Paipu[]>;
98
- getRoomData(roomId: string): Promise<types.RoomData>;
98
+ getRoomData(roomId: string, isObserve?: boolean): Promise<types.RoomData>;
99
99
  getGameData(roomId: string, eventStartPos: number): Promise<types.GameData>;
100
100
  }
101
101
  export declare namespace RiichiCityApi {
package/lib/api.js CHANGED
@@ -284,8 +284,8 @@ var RiichiCityApi = class _RiichiCityApi {
284
284
  const res = await this.post("/record/readPaiPuList", { limit, skip, ...options });
285
285
  return res.data;
286
286
  }
287
- async getRoomData(roomId) {
288
- const res = await this.post("/record/getRoomData", { isObserve: true, keyValue: roomId });
287
+ async getRoomData(roomId, isObserve = true) {
288
+ const res = await this.post("/record/getRoomData", { isObserve, keyValue: roomId });
289
289
  return res.data;
290
290
  }
291
291
  async getGameData(roomId, eventStartPos) {
package/lib/index.js CHANGED
@@ -439,7 +439,8 @@ var RiichiCity = class extends import_koishi3.Service {
439
439
  nickname: "string",
440
440
  updatedAt: "unsigned"
441
441
  }, {
442
- primary: "userId"
442
+ primary: "userId",
443
+ indexes: ["nickname"]
443
444
  });
444
445
  this.api = new import_api2.RiichiCityApi(ctx, config);
445
446
  ctx.on("ready", async () => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hieuzest/koishi-plugin-riichi-city",
3
3
  "description": "",
4
- "version": "0.4.6",
4
+ "version": "0.4.7",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [