koishi-plugin-satori-ai 1.3.0 → 1.3.1

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.
@@ -5,6 +5,7 @@ declare module 'koishi' {
5
5
  }
6
6
  }
7
7
  export interface gameResult {
8
+ playerID: string;
8
9
  message: string;
9
10
  gameName: string;
10
11
  }
@@ -14,12 +15,16 @@ export interface gameResult {
14
15
  export declare abstract class abstractGameSingleGame {
15
16
  protected session: Session;
16
17
  protected disposeListener: () => boolean;
18
+ protected lastActionTime: number;
17
19
  constructor(disposeListener: () => boolean, session: Session);
18
20
  startGame(): Promise<string>;
19
21
  endGame(): Promise<{
20
22
  message: string;
21
23
  gameName: string;
24
+ playerID: string;
22
25
  }>;
26
+ getPlayerID(): string;
27
+ getLastActionTime(): number;
23
28
  processInput(str: string): Promise<string>;
24
29
  }
25
30
  type Constructor<T> = new (...args: any[]) => T;
@@ -47,6 +52,6 @@ export declare abstract class abstractGame<T extends abstractGameSingleGame> {
47
52
  /**
48
53
  * 结束游戏实例,触发结果事件
49
54
  */
50
- endGame(session: Session, ctx: Context): Promise<string>;
55
+ endGame(session: Session, ctx: Context): Promise<boolean>;
51
56
  }
52
57
  export {};
package/lib/game.d.ts CHANGED
@@ -15,6 +15,5 @@ export declare class Game {
15
15
  private registerCommands;
16
16
  startGame(session: Session, gameName: string, args: string[]): Promise<string>;
17
17
  endGame(session: Session): Promise<string>;
18
- private selectGame;
19
18
  private chat;
20
19
  }
@@ -26,6 +26,7 @@ declare class fencingSingleGame extends abstractGameSingleGame {
26
26
  message: string;
27
27
  win: winFlag;
28
28
  gameName: string;
29
+ playerID: string;
29
30
  }>;
30
31
  private enemyDecision;
31
32
  processInput(str: string): Promise<string>;
@@ -26,6 +26,7 @@ declare class goBangSingleGame extends abstractGameSingleGame {
26
26
  message: string;
27
27
  win: winFlag;
28
28
  gameName: string;
29
+ playerID: string;
29
30
  }>;
30
31
  /**
31
32
  * 处理玩家输入(落子坐标)