@@ -8,7 +8,7 @@ import { toId } from '@/tools';
88import { ChatError } from '@/utils/chatError' ;
99
1010import type { NoTranslate , ToTranslate , TranslationFn } from '@/i18n/types' ;
11- import type { BaseGame } from '@/ps/games/game' ;
11+ import type { CommonGame } from '@/ps/games/game' ;
1212import type { PSCommand } from '@/types/chat' ;
1313import type { Room } from 'ps-client' ;
1414import type { HTMLopts } from 'ps-client/classes/common' ;
@@ -31,7 +31,7 @@ type RoomContext = { room: Room; $T: TranslationFn };
3131export const command : PSCommand [ ] = Object . entries ( Games ) . map ( ( [ _gameId , Game ] ) : PSCommand => {
3232 const gameId = _gameId as keyof Games ;
3333
34- type GameFilter = ( game : BaseGame ) => boolean ;
34+ type GameFilter = ( game : CommonGame ) => boolean ;
3535
3636 function getByContext ( ctx : SearchContext ) : GameFilter {
3737 return game => {
@@ -76,7 +76,7 @@ export const command: PSCommand[] = Object.entries(Games).map(([_gameId, Game]):
7676 searchCtx : SearchContext ,
7777 roomCtx : RoomContext ,
7878 restCtx : string
79- ) : BaseGame | null {
79+ ) : CommonGame | null {
8080 if ( ! PSGames [ gameId ] ) return null ;
8181 if ( Game . meta . players === 'single' ) {
8282 const inferredSpecifier = typeof specifier === 'string' ? `#${ Game . meta . abbr } -${ toId ( specifier ) } ` : specifier ;
@@ -125,7 +125,7 @@ export const command: PSCommand[] = Object.entries(Games).map(([_gameId, Game]):
125125 return null ;
126126 }
127127
128- function getGame ( feed : string , searchCtx : SearchContext , roomCtx : RoomContext ) : { game : BaseGame ; ctx : string } {
128+ function getGame ( feed : string , searchCtx : SearchContext , roomCtx : RoomContext ) : { game : CommonGame ; ctx : string } {
129129 const { $T } = roomCtx ;
130130 const [ fullSpec , fullCtx ] = feed . lazySplit ( / \s * , \s * / , 1 ) ;
131131 const fullGame = gameFromContext ( fullSpec , searchCtx , roomCtx , fullCtx ) ;
0 commit comments