@@ -35,7 +35,6 @@ import { setHashesForSkin } from "./skinHash";
3535import * as S3 from "./s3" ;
3636import { generateDescription } from "./services/openAi" ;
3737import KeyValue from "./data/KeyValue" ;
38- import detectRepacks from "./tasks/detectRepacks" ;
3938
4039async function withHandler (
4140 cb : ( handler : DiscordEventHandler ) = > Promise < void >
@@ -389,10 +388,6 @@ program
389388 "Compute the order in which skins should be displayed in the museum"
390389 )
391390 . option ( "--foo" , "Learn about missing skins" )
392- . option (
393- "--winampskinsinfo" ,
394- "Detect skins that were broken by winampskins.info injecting an ad file"
395- )
396391 . option ( "--test-cloudflare" , "Try to upload to cloudflare" )
397392 . action ( async ( arg ) => {
398393 const {
@@ -404,16 +399,12 @@ program
404399 configureR2Cors,
405400 computeMuseumOrder,
406401 foo,
407- winampskinsinfo,
408402 testCloudflare,
409403 } = arg ;
410404 if ( testCloudflare ) {
411405 const buffer = new Buffer ( "testing" , "utf8" ) ;
412406 await S3 . putTemp ( "hello" , buffer ) ;
413407 }
414- if ( winampskinsinfo ) {
415- await detectRepacks ( ) ;
416- }
417408 if ( computeMuseumOrder ) {
418409 await Skins . computeMuseumOrder ( ) ;
419410 console . log ( "Museum order updated." ) ;
@@ -460,10 +451,12 @@ program
460451 }
461452 if ( foo ) {
462453 const ctx = new UserContext ( ) ;
463- const missingModernSkins = await KeyValue . get ( "missingModernSkins" ) ;
454+ const missingModernSkins = await KeyValue . get < string [ ] > (
455+ "missingModernSkins"
456+ ) ;
464457 const missingModernSkinsSet = new Set ( missingModernSkins ) ;
465458 const skins = { } ;
466- for ( const md5 of missingModernSkins ) {
459+ for ( const md5 of missingModernSkins ! ) {
467460 const skin = await SkinModel . fromMd5 ( ctx , md5 ) ;
468461 if ( skin == null ) {
469462 continue ;
@@ -489,7 +482,7 @@ program
489482 . select ( ) ;
490483 console . log ( `Found ${ skinRows . length } skins to update` ) ;
491484 const missingModernSkins = new Set (
492- await KeyValue . get ( "missingModernSkins" )
485+ await KeyValue . get < string [ ] > ( "missingModernSkins" )
493486 ) ;
494487 const skins = skinRows . map ( ( row ) => new SkinModel ( ctx , row ) ) ;
495488 for ( const skin of skins ) {
0 commit comments