11import { uploadToPastie } from 'ps-client/tools' ;
22
33import { PSPointsNonce , PSRoomConfigs } from '@/cache' ;
4+ import { getAllUGOPoints } from '@/cache/ugo' ;
45import {
56 type BulkPointsDataInput ,
67 type Model as PointsModel ,
@@ -11,6 +12,7 @@ import {
1112 resetPoints ,
1213} from '@/database/points' ;
1314import { IS_ENABLED } from '@/enabled' ;
15+ import { renderUGOBoardGamesLeaderboard } from '@/ps/commands/games/other' ;
1416import { LB_COMMON_STYLES as COMMON_STYLES , LB_STYLES } from '@/ps/other/leaderboardStyles' ;
1517import { toId } from '@/tools' ;
1618import { ChatError } from '@/utils/chatError' ;
@@ -242,6 +244,13 @@ export const command: PSCommand[] = [
242244 aliases : [ 'lb' ] ,
243245 categories : [ 'points' ] ,
244246 async run ( { message, $T, args, broadcastHTML } ) {
247+ // UGO-CODE
248+ if ( message . target . roomid === 'boardgames' ) {
249+ // Overload for Board Games
250+ const data = getAllUGOPoints ( ) ;
251+ message . author . pageHTML ( renderUGOBoardGamesLeaderboard ( data , $T ) , { name : 'ugo' } ) ;
252+ return ;
253+ }
245254 if ( ! IS_ENABLED . DB ) throw new ChatError ( $T ( 'DISABLED.DB' ) ) ;
246255 // TODO: Maybe have some helper function to parse room name if not given
247256 const room = message . parent . getRoom ( message . type === 'chat' ? message . target . id : ( args . shift ( ) ?? '' ) ) ;
0 commit comments