@@ -430,6 +430,17 @@ export class Lichess {
430430 ) ;
431431 }
432432
433+ /**
434+ * Fetch the spectator game chat
435+ */
436+ async gameChatGet ( params : { gameId : string } ) {
437+ const path = `/game/${ params . gameId } /chat` as const ;
438+ return await this . requestor . get (
439+ { path } ,
440+ { 200 : { kind : "ndjson" , schema : schemas . SpectatorGameChat } } ,
441+ ) ;
442+ }
443+
433444 /**
434445 * Export ongoing game of a user
435446 */
@@ -2750,13 +2761,13 @@ export class Lichess {
27502761 }
27512762
27522763 /**
2753- * Fetch the game chat
2764+ * Fetch the player chat
27542765 */
27552766 async boardGameChatGet ( params : { gameId : string } ) {
27562767 const path = `/api/board/game/${ params . gameId } /chat` as const ;
27572768 return await this . requestor . get (
27582769 { path } ,
2759- { 200 : { kind : "ndjson" , schema : schemas . GameChat } } ,
2770+ { 200 : { kind : "ndjson" , schema : schemas . PlayerGameChat } } ,
27602771 ) ;
27612772 }
27622773
@@ -2954,7 +2965,7 @@ export class Lichess {
29542965 const path = `/api/bot/game/${ params . gameId } /chat` as const ;
29552966 return await this . requestor . get (
29562967 { path } ,
2957- { 200 : { kind : "ndjson" , schema : schemas . GameChat } } ,
2968+ { 200 : { kind : "ndjson" , schema : schemas . PlayerGameChat } } ,
29582969 ) ;
29592970 }
29602971
0 commit comments