@@ -8,6 +8,7 @@ import { Small } from '@/ps/games/render';
88import { checkWord } from '@/ps/games/scrabble/checker' ;
99import { ScrabbleMods } from '@/ps/games/scrabble/constants' ;
1010import { ScrabbleModData } from '@/ps/games/scrabble/mods' ;
11+ import { TOKEN_TYPE } from '@/ps/games/splendor/constants' ;
1112import metadata from '@/ps/games/splendor/metadata.json' ;
1213import { PokemonCard , TrainerCard } from '@/ps/games/splendor/render' ;
1314import { LB_STYLES } from '@/ps/other/leaderboardStyles' ;
@@ -21,6 +22,7 @@ import { rankedSort } from '@/utils/rankedSort';
2122import type { UGOUserPoints } from '@/cache/ugo' ;
2223import type { ScrabbleDexEntry } from '@/database/games' ;
2324import type { ToTranslate , TranslationFn } from '@/i18n/types' ;
25+ import type { Trainer } from '@/ps/games/splendor/types' ;
2426import type { GamesList } from '@/ps/games/types' ;
2527import type { PSCommand } from '@/types/chat' ;
2628import type { ReactElement } from 'react' ;
@@ -114,7 +116,7 @@ export const command: PSCommand[] = [
114116 help : 'Shows the card info for a Splendor card.' ,
115117 syntax : 'CMD [card name]' ,
116118 categories : [ 'game' ] ,
117- async run ( { broadcastHTML, arg, $T } ) {
119+ async run ( { message , broadcastHTML, arg, $T } ) {
118120 const id = toId ( arg ) ;
119121 if ( id === 'constructor' ) throw new ChatError ( $T ( 'SCREW_YOU' ) ) ;
120122 if ( id in metadata . pokemon ) {
@@ -131,6 +133,19 @@ export const command: PSCommand[] = [
131133 < TrainerCard data = { card } />
132134 </ Small >
133135 ) ;
136+ } else if ( id === message . parent . status . userid ) {
137+ const card : Trainer = {
138+ id,
139+ name : message . parent . status . username ?? '-' ,
140+ points : 15 ,
141+ types : { [ TOKEN_TYPE . DRAGON ] : 4 } ,
142+ art : 'https://play.pokemonshowdown.com/sprites/trainers/supernerd.png' ,
143+ } ;
144+ broadcastHTML (
145+ < Small >
146+ < TrainerCard data = { card } />
147+ </ Small >
148+ ) ;
134149 } else throw new ChatError ( $T ( 'ENTRY_NOT_FOUND' ) ) ;
135150 } ,
136151 } ,
0 commit comments