From bda32b1fb88c469d272faf3e6766d4499c1f5f59 Mon Sep 17 00:00:00 2001 From: Kalle <38327916+Sendouc@users.noreply.github.com> Date: Sun, 27 Apr 2025 12:14:14 +0300 Subject: [PATCH] Homemade badges format use .json + checks (#2225) * wip * wip * test check * Real name * Done * fix * fix json --- .github/workflows/main.yml | 2 + app/features/badges/homemade.json | 874 +++++++++++++ app/features/badges/homemade.ts | 1107 ----------------- migrations/085-fix-badge-names.js | 7 + package.json | 1 + .../{FLcollegiate.avif => fl-collegiate.avif} | Bin .../{FLcollegiate.gif => fl-collegiate.gif} | Bin .../{FLcollegiate.png => fl-collegiate.png} | Bin scripts/check-homemade-badges.ts | 52 + scripts/sync-homemade-badges.ts | 38 +- 10 files changed, 943 insertions(+), 1138 deletions(-) create mode 100644 app/features/badges/homemade.json delete mode 100644 app/features/badges/homemade.ts create mode 100644 migrations/085-fix-badge-names.js rename public/static-assets/badges/{FLcollegiate.avif => fl-collegiate.avif} (100%) rename public/static-assets/badges/{FLcollegiate.gif => fl-collegiate.gif} (100%) rename public/static-assets/badges/{FLcollegiate.png => fl-collegiate.png} (100%) create mode 100644 scripts/check-homemade-badges.ts diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7b6a8fbea..9e41faa88 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -35,3 +35,5 @@ jobs: run: npm run test:unit - name: Check translations jsons run: npm run check-translation-jsons:no-write + - name: Check homemade badges + run: npm run check-homemade-badges diff --git a/app/features/badges/homemade.json b/app/features/badges/homemade.json new file mode 100644 index 000000000..bf9535359 --- /dev/null +++ b/app/features/badges/homemade.json @@ -0,0 +1,874 @@ +{ + "50-cal-fir": { + "displayName": "Gun (Winning 50 Calibur League)", + "authorDiscordId": "530093822806458368" + }, + "50-cal-sec": { + "displayName": "Gold Bullet (Qualifying for 50 Calibur League)", + "authorDiscordId": "530093822806458368" + }, + "50-cal-thi": { + "displayName": "Silver Bullet (Winning Silver Bracket 50 Calibur)", + "authorDiscordId": "530093822806458368" + }, + "academy_showcase": { + "displayName": "Academy Showcase", + "authorDiscordId": "643355948265766912" + }, + "alicehand3": { + "displayName": "Gamers Outreach Charity Tournament", + "authorDiscordId": "528851510222782474" + }, + "artsupplies": { + "displayName": "Art Supplies Pencil Award", + "authorDiscordId": "1320944066002681876" + }, + "artsuppliesbronze": { + "displayName": "Art Supplies Pencil Award (Bronze)", + "authorDiscordId": "1320944066002681876" + }, + "artsuppliessilver": { + "displayName": "Art Supplies Pencil Award (Silver)", + "authorDiscordId": "1320944066002681876" + }, + "ausflag": { + "displayName": "OCE Open", + "authorDiscordId": "1170249805373657093" + }, + "badgepalooza": { + "displayName": "Badge Palooza", + "authorDiscordId": "528851510222782474" + }, + "barcha": { + "displayName": "FC Barcha", + "authorDiscordId": "528851510222782474" + }, + "barnacle-bash": { + "displayName": "Barnacle Bash", + "authorDiscordId": "181270348262539265" + }, + "beach223": { + "displayName": "Summer Days", + "authorDiscordId": "1170249805373657093" + }, + "bfis": { + "displayName": "Biggest Fish in the Sea", + "authorDiscordId": "629773997822967819" + }, + "bingo-club": { + "displayName": "[OMD] Bingo Club", + "authorDiscordId": "751912670403362836" + }, + "birthday_cake": { + "displayName": "Eggs and Salad: Birthday Edition", + "authorDiscordId": "336683473714544641" + }, + "blahajopen": { + "displayName": "Shark Tank: Deep Waters", + "authorDiscordId": "528851510222782474" + }, + "bluelock": { + "displayName": "Blue Lock", + "authorDiscordId": "528851510222782474" + }, + "breakzachsbank": { + "displayName": "Break Zach's Bank", + "authorDiscordId": "528851510222782474" + }, + "breeze": { + "displayName": "Breeze LAN (1st)", + "authorDiscordId": "342369454719631361" + }, + "breeze2": { + "displayName": "Breeze LAN (2nd)", + "authorDiscordId": "342369454719631361" + }, + "breeze3": { + "displayName": "Breeze LAN (3rd)", + "authorDiscordId": "342369454719631361" + }, + "breezesr": { + "displayName": "Breeze LAN (Salmon Run)", + "authorDiscordId": "342369454719631361" + }, + "brflgx": { + "displayName": "A Splatoon Brazil Tournament", + "authorDiscordId": "701870845550657677" + }, + "bucketmeow12": { + "displayName": "Token Of Appreciation", + "authorDiscordId": "1170249805373657093" + }, + "calliesit": { + "displayName": "Splatoon 1 Tournament (Callie)", + "authorDiscordId": "336683473714544641" + }, + "calmbefore": { + "displayName": "Calm Before the Storm", + "authorDiscordId": "631246535560265749" + }, + "catfoodbowl": { + "displayName": "Dr. Meowser's Cat Food Bowl", + "authorDiscordId": "324396128906903552" + }, + "cc-smidge": { + "displayName": "Scrap Bin (Smidge)", + "authorDiscordId": "148874365105078272" + }, + "cc-smudge": { + "displayName": "Supply Closet (Smudge)", + "authorDiscordId": "148874365105078272" + }, + "chao": { + "displayName": "Chao Garden", + "authorDiscordId": "528851510222782474" + }, + "chara_special": { + "displayName": "A Special Tournament", + "authorDiscordId": "1081428018666422313" + }, + "chishoals": { + "displayName": "Chi-Shoals", + "authorDiscordId": "528851510222782474" + }, + "climbspire": { + "displayName": "Climb The Spire", + "authorDiscordId": "338806780446638082" + }, + "clutch_united": { + "displayName": "Clutch United Squid Storm LAN Tournament", + "authorDiscordId": "336683473714544641" + }, + "coffeecup": { + "displayName": "CoffeeCup", + "authorDiscordId": "1320944066002681876" + }, + "cookie": { + "displayName": "VERSUS THE WORLD", + "authorDiscordId": "528851510222782474" + }, + "crab_tank": { + "displayName": "Torneo Crab Cancel Perfect and Shadow", + "authorDiscordId": "336683473714544641" + }, + "crimson": { + "displayName": "Stellaris Phantasm: Crimson Bracket", + "authorDiscordId": "617399529532293150" + }, + "curseofexcalibur": { + "displayName": "5 Unique Curse of Excalibur Events", + "authorDiscordId": "338806780446638082" + }, + "custom_e-liter": { + "displayName": "Not Enough Liter", + "authorDiscordId": "352207524390240257" + }, + "daytonaspeedweeks1st": { + "displayName": "Just Daytona 1-5", + "authorDiscordId": "528851510222782474" + }, + "daytonaspeedweeks2nd": { + "displayName": "Just Daytona 2nd 1-5", + "authorDiscordId": "528851510222782474" + }, + "decavzippy": { + "displayName": "Zippy's Birthday Bash!", + "authorDiscordId": "338806780446638082" + }, + "decavzippyc": { + "displayName": "Zippy's Birthday Bash! Lower Bracket", + "authorDiscordId": "338806780446638082" + }, + "dolphin": { + "displayName": "Dolphin Showdown", + "authorDiscordId": "528851510222782474" + }, + "dreadnoughtus": { + "displayName": "Mesozoic Mayhem: Dreadnoughtus Undefeated", + "authorDiscordId": "352207524390240257" + }, + "dynamo": { + "displayName": "Dynamo Roller", + "authorDiscordId": "534502084134043648" + }, + "enabbq": { + "displayName": "ENA (Dream BBQ)", + "authorDiscordId": "528851510222782474" + }, + "eous": { + "displayName": "Proxy Training", + "authorDiscordId": "528851510222782474" + }, + "ferris_wheel": { + "displayName": "Wheel of Names", + "authorDiscordId": "336683473714544641" + }, + "fl-collegiate": { + "displayName": "Florida Collegiate Draft Cup", + "authorDiscordId": "285504780154044416" + }, + "flux": { + "displayName": "Reef-Lux Achievement", + "authorDiscordId": "631246535560265749" + }, + "fountain_of_dreams": { + "displayName": "Fountain of Dreams", + "authorDiscordId": "164695301007998979" + }, + "frcpgd": { + "displayName": "fractured cup gold", + "authorDiscordId": "960213930586824766" + }, + "frcup": { + "displayName": "fractured cup", + "authorDiscordId": "960213930586824766" + }, + "frostbitebase2x": { + "displayName": "Frostbite Ascent (Top 8)", + "authorDiscordId": "354880982890971136" + }, + "frostbitegold2x": { + "displayName": "Frostbite Ascent", + "authorDiscordId": "354880982890971136" + }, + "frostbitesilver2x": { + "displayName": "Frostbite Ascent (Summit Bracket)", + "authorDiscordId": "354880982890971136" + }, + "full-auto": { + "displayName": "Full Auto", + "authorDiscordId": "534502084134043648" + }, + "fullwipe": { + "displayName": "FULLWIPE LAN", + "authorDiscordId": "570323825669963972" + }, + "fullwipe_bronze": { + "displayName": "FULLWIPE LAN (3rd)", + "authorDiscordId": "570323825669963972" + }, + "fullwipe_silver": { + "displayName": "FULLWIPE LAN (2nd)", + "authorDiscordId": "570323825669963972" + }, + "gator": { + "displayName": "Good Morning Chat", + "authorDiscordId": "528851510222782474" + }, + "gatorlan_salmon_1st": { + "displayName": "GatorLAN - Side of Salmon", + "authorDiscordId": "285504780154044416" + }, + "gengar": { + "displayName": "GHOST TYPE RUSH", + "authorDiscordId": "528851510222782474" + }, + "gengarshiny": { + "displayName": "GHOST TYPE RUSH SHINY EDITION", + "authorDiscordId": "528851510222782474" + }, + "getcoupled": { + "displayName": "Get Coupled", + "authorDiscordId": "418496741088690177" + }, + "glaze": { + "displayName": "THE GLAZE GAUNTLET", + "authorDiscordId": "528851510222782474" + }, + "goldenbrush": { + "displayName": "Golden Brush Award", + "authorDiscordId": "338806780446638082" + }, + "gyra": { + "displayName": "Level Up x2 - Leveled Up!", + "authorDiscordId": "528851510222782474" + }, + "hacker-cup-bronze": { + "displayName": "HACKER Cup (3rd Place)", + "authorDiscordId": "530722502603833346" + }, + "hacker-cup-gold": { + "displayName": "HACKER Cup (1st Place)", + "authorDiscordId": "530722502603833346" + }, + "hacker-cup-silver": { + "displayName": "HACKER Cup (2nd Place)", + "authorDiscordId": "530722502603833346" + }, + "happyena": { + "displayName": "ENA", + "authorDiscordId": "528851510222782474" + }, + "hardcore1v1": { + "displayName": "Hardcore Mode", + "authorDiscordId": "338806780446638082" + }, + "hatsunemiku": { + "displayName": "MIKU MIKU BEAM!!!", + "authorDiscordId": "338806780446638082" + }, + "hatsunemikuteto": { + "displayName": "MIKU MIKU BEAM!!! Teto Takeover!", + "authorDiscordId": "338806780446638082" + }, + "headband": { + "displayName": "Catgirl Challenge", + "authorDiscordId": "789943264370884708" + }, + "heaven2ocean": { + "displayName": "Heaven 2 Ocean Qualifer", + "authorDiscordId": "528851510222782474" + }, + "idtgamb": { + "displayName": "It's Dangerous To Go Alone Master Bracket", + "authorDiscordId": "354880982890971136" + }, + "ink-torrent": { + "displayName": "Ink Torrent", + "authorDiscordId": "534502084134043648" + }, + "inkpractice": { + "displayName": "Ink Practice", + "authorDiscordId": "342369454719631361" + }, + "inkraycup": { + "displayName": "Inkray Cup", + "authorDiscordId": "842371851606949909" + }, + "inkstrikeinv": { + "displayName": "Inkstrike Invitational", + "authorDiscordId": "789943264370884708" + }, + "jamboree": { + "displayName": "JJaeigh's Jamboree", + "authorDiscordId": "528851510222782474" + }, + "jauntlet": { + "displayName": "The Jauntlet", + "authorDiscordId": "528851510222782474" + }, + "jrs_draft": { + "displayName": "Junior's Draft", + "authorDiscordId": "118724226994667523" + }, + "krakenmarepoke": { + "displayName": "Gardevoir", + "authorDiscordId": "338806780446638082" + }, + "krakenmarepokeshiny": { + "displayName": "Shiny Gardevoir", + "authorDiscordId": "338806780446638082" + }, + "kthigh": { + "displayName": "Reef Reunion (999 KT Power)", + "authorDiscordId": "1170249805373657093" + }, + "ktlow": { + "displayName": "Reef Reunion (100 KT Power)", + "authorDiscordId": "1170249805373657093" + }, + "ktmed": { + "displayName": "Reef Reunion (500 KT Power)", + "authorDiscordId": "1170249805373657093" + }, + "liftoff": { + "displayName": "Liftoff", + "authorDiscordId": "789943264370884708" + }, + "lone_sailor": { + "displayName": "Lone Sailor", + "authorDiscordId": "354880982890971136" + }, + "low-tier-bouts": { + "displayName": "Low Tier Bouts", + "authorDiscordId": "430487372015206410" + }, + "lte_badge": { + "displayName": "Low Tier Experiments", + "authorDiscordId": "430487372015206410" + }, + "lumiere": { + "displayName": "Stellaris Phantasm: Lumière Bracket", + "authorDiscordId": "617399529532293150" + }, + "lunablaster": { + "displayName": "Blast Away!", + "authorDiscordId": "342369454719631361" + }, + "magatama": { + "displayName": "Magatama Turnabout", + "authorDiscordId": "530722502603833346" + }, + "magikarp": { + "displayName": "Level Up", + "authorDiscordId": "528851510222782474" + }, + "manshine": { + "displayName": "Manshine City", + "authorDiscordId": "528851510222782474" + }, + "mariesit": { + "displayName": "Splatoon 1 Tournament (Marie)", + "authorDiscordId": "336683473714544641" + }, + "matchmeet": { + "displayName": "Meet Your Match", + "authorDiscordId": "631246535560265749" + }, + "matchmeetex": { + "displayName": "Meet Your Match Counterpick Gauntlet", + "authorDiscordId": "631246535560265749" + }, + "meadowscow": { + "displayName": "Moo Moo Cup", + "authorDiscordId": "528851510222782474" + }, + "mew": { + "displayName": "5 TSO Tournaments", + "authorDiscordId": "528851510222782474" + }, + "mimikyu": { + "displayName": "Mimikyu Monday", + "authorDiscordId": "528851510222782474" + }, + "minus-one-cup": { + "displayName": "Minus One Cup", + "authorDiscordId": "569271521776762896" + }, + "minus-one-cup-coach": { + "displayName": "Minus One Cup (Coach)", + "authorDiscordId": "569271521776762896" + }, + "minus-one-open": { + "displayName": "Minus One Open", + "authorDiscordId": "569271521776762896" + }, + "muchen": { + "displayName": "Bastard München", + "authorDiscordId": "528851510222782474" + }, + "mugcupmini": { + "displayName": "Mug Cup Mini", + "authorDiscordId": "338806780446638082" + }, + "new-game-plus": { + "displayName": "New Game +", + "authorDiscordId": "216653023252840449" + }, + "newa41cb": { + "displayName": "All 4 One: Clam Blitz", + "authorDiscordId": "338806780446638082" + }, + "newa41ggbronze": { + "displayName": "A41 GG Bronze Bracket", + "authorDiscordId": "338806780446638082" + }, + "newa41gggold": { + "displayName": "A41 GG Gold Bracket", + "authorDiscordId": "338806780446638082" + }, + "newa41ggiron": { + "displayName": "A41 GG Iron Bracket", + "authorDiscordId": "338806780446638082" + }, + "newa41ggsilver": { + "displayName": "A41 GG Silver Bracket", + "authorDiscordId": "338806780446638082" + }, + "newa41rm": { + "displayName": "All 4 One: Rainmaker", + "authorDiscordId": "338806780446638082" + }, + "newa41sz": { + "displayName": "All 4 One: Splat Zones", + "authorDiscordId": "338806780446638082" + }, + "newa41tc": { + "displayName": "All 4 One: Tower Control", + "authorDiscordId": "338806780446638082" + }, + "noentrybronze": { + "displayName": "Banning Legends 3rd", + "authorDiscordId": "338806780446638082" + }, + "noentrygold": { + "displayName": "Banning Legends", + "authorDiscordId": "338806780446638082" + }, + "noentrysilver": { + "displayName": "Banning Legends 2nd", + "authorDiscordId": "338806780446638082" + }, + "octoshot": { + "displayName": "Weapon Lockdown", + "authorDiscordId": "338806780446638082" + }, + "original-message-deleted": { + "displayName": "[Original Message Deleted]", + "authorDiscordId": "751912670403362836" + }, + "paraflinch": { + "displayName": "Paraflinch", + "authorDiscordId": "528851510222782474" + }, + "peashooter": { + "displayName": "Peashooter Achievement", + "authorDiscordId": "789943264370884708" + }, + "pinchzachsbank": { + "displayName": "Pinch Zach's Bank", + "authorDiscordId": "528851510222782474" + }, + "pinknes": { + "displayName": "New InkLAN", + "authorDiscordId": "338806780446638082" + }, + "pou": { + "displayName": "Pou Basket", + "authorDiscordId": "285896534380511234" + }, + "pou_b": { + "displayName": "Blue Pou Achievement", + "authorDiscordId": "285896534380511234" + }, + "pps": { + "displayName": "Power Pair Showdown", + "authorDiscordId": "789943264370884708" + }, + "prizefight": { + "displayName": "Prize Fight", + "authorDiscordId": "789943264370884708" + }, + "prizefightgold": { + "displayName": "Prize Fight: Gold Edition", + "authorDiscordId": "789943264370884708" + }, + "punkshrimp": { + "displayName": "Anarchy NoVA", + "authorDiscordId": "528851510222782474" + }, + "pxg": { + "displayName": "P.X.G", + "authorDiscordId": "528851510222782474" + }, + "raid-weekend": { + "displayName": "Raid Weekend", + "authorDiscordId": "354880982890971136" + }, + "ranked_refreshments_4_7": { + "displayName": "Ranked Refreshments: Lime", + "authorDiscordId": "336683473714544641" + }, + "ranked_refreshments_8_11": { + "displayName": "Ranked Refreshments: Dragonfruit", + "authorDiscordId": "336683473714544641" + }, + "ranked_refreshments_x_3": { + "displayName": "Ranked Refreshments: Lemon", + "authorDiscordId": "336683473714544641" + }, + "reachbadge": { + "displayName": "Reach", + "authorDiscordId": "338806780446638082" + }, + "real": { + "displayName": "Re Al", + "authorDiscordId": "528851510222782474" + }, + "revocup": { + "displayName": "Revo'Cup", + "authorDiscordId": "309327923129745409" + }, + "rockbud": { + "displayName": "Pikmin Bloom (Silver)", + "authorDiscordId": "534502084134043648" + }, + "rockflower": { + "displayName": "Pikmin Bloom (Gold)", + "authorDiscordId": "534502084134043648" + }, + "rockleaf": { + "displayName": "Pikmin Bloom (Bronze)", + "authorDiscordId": "534502084134043648" + }, + "rottenmiku": { + "displayName": "MIKU MIKU BEAM!!! Lower Brackets", + "authorDiscordId": "338806780446638082" + }, + "s50badge": { + "displayName": "Anarchy Adventures", + "authorDiscordId": "336683473714544641" + }, + "sakuramiku": { + "displayName": "MIKU MIKU BEAM!!! Sakura Edition", + "authorDiscordId": "338806780446638082" + }, + "saladbowl": { + "displayName": "Eggs and Salad", + "authorDiscordId": "336683473714544641" + }, + "saladbowl_tomato": { + "displayName": "Turf War Tomatoes", + "authorDiscordId": "336683473714544641" + }, + "seabattle": { + "displayName": "Seabattle", + "authorDiscordId": "528851510222782474" + }, + "serenade": { + "displayName": "Stellaris Phantasm: Serenade Bracket", + "authorDiscordId": "617399529532293150" + }, + "sharktank1st": { + "displayName": "Shark Tank (Gold)", + "authorDiscordId": "528851510222782474" + }, + "sharktank2nd": { + "displayName": "Shark Tank (Silver)", + "authorDiscordId": "528851510222782474" + }, + "sharktank3rd": { + "displayName": "Shark Tank (Bronze)", + "authorDiscordId": "528851510222782474" + }, + "shiftingtides": { + "displayName": "Shifting Tides", + "authorDiscordId": "338806780446638082" + }, + "shinygyra": { + "displayName": "Level Up: Shiny Hunt x2 - Leveled Up!", + "authorDiscordId": "528851510222782474" + }, + "shinymagikarp": { + "displayName": "Level Up: Shiny Hunt", + "authorDiscordId": "528851510222782474" + }, + "shinymew": { + "displayName": "10 TSO Tournaments", + "authorDiscordId": "528851510222782474" + }, + "shinywooper": { + "displayName": "Shiny Wooper Achievement", + "authorDiscordId": "528851510222782474" + }, + "ship": { + "displayName": "Abandon Ship", + "authorDiscordId": "528851510222782474" + }, + "slyeion": { + "displayName": "Sylveon", + "authorDiscordId": "338806780446638082" + }, + "soulcupgold": { + "displayName": "Soul League (Div 1)", + "authorDiscordId": "309327923129745409" + }, + "soulcupsilver": { + "displayName": "Soul League (Other Div)", + "authorDiscordId": "309327923129745409" + }, + "spacedog": { + "displayName": "SpaceDog Showdown", + "authorDiscordId": "528851510222782474" + }, + "spacedogjolly": { + "displayName": "SpaceDog Showdown (Jolly Edition)", + "authorDiscordId": "528851510222782474" + }, + "special4": { + "displayName": "Specials To The Power Of Four!", + "authorDiscordId": "1170249805373657093" + }, + "spino": { + "displayName": "Mesozoic Mayhem: Special Spino", + "authorDiscordId": "352207524390240257" + }, + "spinogold": { + "displayName": "Mesozoic Mayhem: Gold Special Spino", + "authorDiscordId": "352207524390240257" + }, + "splashdownsat": { + "displayName": "Splashdown Saturday", + "authorDiscordId": "631246535560265749" + }, + "splat_dualie": { + "displayName": "Dodge Rollers", + "authorDiscordId": "218883697007394816" + }, + "splat-n-go": { + "displayName": "Splat'n'Go", + "authorDiscordId": "570323825669963972" + }, + "splatlegacy": { + "displayName": "Splat Legacy LAN", + "authorDiscordId": "342369454719631361" + }, + "squidtheforce": { + "displayName": "Squidforce Cup", + "authorDiscordId": "1320944066002681876" + }, + "sunday-run": { + "displayName": "Sunday Run", + "authorDiscordId": "570323825669963972" + }, + "sw": { + "displayName": "SquidWest Events", + "authorDiscordId": "528851510222782474" + }, + "swig": { + "displayName": "Big Swig", + "authorDiscordId": "534502084134043648" + }, + "szclassic": { + "displayName": "Zones Classic", + "authorDiscordId": "528851510222782474" + }, + "szroyale": { + "displayName": "Zones Royale", + "authorDiscordId": "528851510222782474" + }, + "tableturf-rise": { + "displayName": "TableTurf: RISE", + "authorDiscordId": "528851510222782474" + }, + "takorokacup": { + "displayName": "Takoroka Cup", + "authorDiscordId": "1320944066002681876" + }, + "teabag": { + "displayName": "TeaCup", + "authorDiscordId": "338806780446638082" + }, + "texaslan": { + "displayName": "H-Town Splashdown", + "authorDiscordId": "528851510222782474" + }, + "tfstourney": { + "displayName": "TFS Tourneys", + "authorDiscordId": "789943264370884708" + }, + "three_course_pal": { + "displayName": "Squids For Palestinian Kids", + "authorDiscordId": "338806780446638082" + }, + "tnttoken12": { + "displayName": "DYNAMITE TOKEN", + "authorDiscordId": "1170249805373657093" + }, + "toecar": { + "displayName": "TOECAR", + "authorDiscordId": "1320944066002681876" + }, + "tonytonyc": { + "displayName": "Tony Tony Challenge", + "authorDiscordId": "338806780446638082" + }, + "treasure": { + "displayName": "Buried Treasure", + "authorDiscordId": "528851510222782474" + }, + "tree": { + "displayName": "Treetop Tussle", + "authorDiscordId": "789943264370884708" + }, + "treegold": { + "displayName": "Treetop Tussle: Gold Edition", + "authorDiscordId": "789943264370884708" + }, + "tricera": { + "displayName": "Mesozoic Mayhem: Triceratrials", + "authorDiscordId": "352207524390240257" + }, + "triceragold": { + "displayName": "Mesozoic Mayhem: Gold Triceratrials", + "authorDiscordId": "352207524390240257" + }, + "tristriked3": { + "displayName": "Tristrike Tuesday", + "authorDiscordId": "789943264370884708" + }, + "tristriketuesday": { + "displayName": "Tristrike Tuesday (D5 CAPPED)", + "authorDiscordId": "789943264370884708" + }, + "tritongold-1": { + "displayName": "Triton-Cup 100", + "authorDiscordId": "335179210878353409" + }, + "tso1watermelon": { + "displayName": "Division 1 (Watermelon)", + "authorDiscordId": "338806780446638082" + }, + "tso2pineapple": { + "displayName": "Division 2 (Pineapple)", + "authorDiscordId": "338806780446638082" + }, + "tso3peach": { + "displayName": "Division 3 (Peach)", + "authorDiscordId": "338806780446638082" + }, + "tso4cherry": { + "displayName": "Division 4 (Cherry)", + "authorDiscordId": "338806780446638082" + }, + "tso5blueberry": { + "displayName": "Division 5 (Blueberry)", + "authorDiscordId": "338806780446638082" + }, + "turf1230": { + "displayName": "Turf War Takedown", + "authorDiscordId": "1170249805373657093" + }, + "turf12300": { + "displayName": "Turf War Takedown (Special)", + "authorDiscordId": "1170249805373657093" + }, + "turnabout-suspect": { + "displayName": "Turnabout Suspect", + "authorDiscordId": "418176537561661441" + }, + "twinsquiddies": { + "displayName": "Twin Squiddies", + "authorDiscordId": "789943264370884708" + }, + "twistedtoe": { + "displayName": "Twisted Toe", + "authorDiscordId": "1320944066002681876" + }, + "ubers": { + "displayName": "Ubers", + "authorDiscordId": "528851510222782474" + }, + "vchargersplash": { + "displayName": "Charger Assault", + "authorDiscordId": "338806780446638082" + }, + "vibesfirst": { + "displayName": "Splat Vibes LAN", + "authorDiscordId": "342369454719631361" + }, + "vibessecond": { + "displayName": "Splat Vibes LAN (Top 4)", + "authorDiscordId": "342369454719631361" + }, + "wave-breaker": { + "displayName": "Ride the Wave", + "authorDiscordId": "534502084134043648" + }, + "wave1234567_4": { + "displayName": "Tough Tides", + "authorDiscordId": "1170249805373657093" + }, + "wi-wi-wi": { + "displayName": "Wi Wi Wi Cat", + "authorDiscordId": "530722502603833346" + }, + "wiper": { + "displayName": "Squeaky Clean Scrap", + "authorDiscordId": "528851510222782474" + }, + "zekkocup": { + "displayName": "Zekko Cup", + "authorDiscordId": "1320944066002681876" + } +} diff --git a/app/features/badges/homemade.ts b/app/features/badges/homemade.ts deleted file mode 100644 index 5954f1ccd..000000000 --- a/app/features/badges/homemade.ts +++ /dev/null @@ -1,1107 +0,0 @@ -interface BadgeInfo { - // The name of the badge as it shows on the web page: "Awarded for winning {displayName}" - displayName: string; - // The file name of the badge: fileName.png, fileName.avif & fileName.gif. Should not be edited after the badge is added. - fileName: string; - // The Discord ID of the person who made the badge (not the person who commissioned it) - authorDiscordId: string; -} - -export const homemadeBadges: BadgeInfo[] = [ - // EXAMPLE - // { - // displayName: "Example Badge", - // fileName: "example", - // authorDiscordId: "123456789012345678", - // }, - { - displayName: "DYNAMITE TOKEN", - fileName: "tnttoken12", - authorDiscordId: "1170249805373657093", - }, - { - displayName: "5 Unique Curse of Excalibur Events", - fileName: "curseofexcalibur", - authorDiscordId: "338806780446638082", - }, - { - displayName: "Summer Days", - fileName: "beach223", - authorDiscordId: "1170249805373657093", - }, - { - displayName: "Turnabout Suspect", - fileName: "turnabout-suspect", - authorDiscordId: "418176537561661441", - }, - { - displayName: "HACKER Cup (1st Place)", - fileName: "hacker-cup-gold", - authorDiscordId: "530722502603833346", - }, - { - displayName: "HACKER Cup (2nd Place)", - fileName: "hacker-cup-silver", - authorDiscordId: "530722502603833346", - }, - { - displayName: "HACKER Cup (3rd Place)", - fileName: "hacker-cup-bronze", - authorDiscordId: "530722502603833346", - }, - { - displayName: "Wi Wi Wi Cat", - fileName: "wi-wi-wi", - authorDiscordId: "530722502603833346", - }, - { - displayName: "Magatama Turnabout", - fileName: "magatama", - authorDiscordId: "530722502603833346", - }, - { - displayName: "Tristrike Tuesday", - fileName: "tristriked3", - authorDiscordId: "789943264370884708", - }, - { - displayName: "Hardcore Mode", - fileName: "hardcore1v1", - authorDiscordId: "338806780446638082", - }, - { - displayName: "Shifting Tides", - fileName: "shiftingtides", - authorDiscordId: "338806780446638082", - }, - { - displayName: "Gamers Outreach Charity Tournament", - fileName: "alicehand3", - authorDiscordId: "528851510222782474", - }, - { - displayName: "Zippy's Birthday Bash!", - fileName: "decavzippy", - authorDiscordId: "338806780446638082", - }, - { - displayName: "Zippy's Birthday Bash! Lower Bracket", - fileName: "decavzippyc", - authorDiscordId: "338806780446638082", - }, - { - displayName: "Sylveon", - fileName: "slyeion", - authorDiscordId: "338806780446638082", - }, - { - displayName: "Triton-Cup 100", - fileName: "tritongold-1", - authorDiscordId: "335179210878353409", - }, - { - displayName: "GatorLAN - Side of Salmon", - fileName: "gatorlan_salmon_1st", - authorDiscordId: "285504780154044416", - }, - { - displayName: "Gardevoir", - fileName: "krakenmarepoke", - authorDiscordId: "338806780446638082", - }, - { - displayName: "Shiny Gardevoir", - fileName: "krakenmarepokeshiny", - authorDiscordId: "338806780446638082", - }, - { - displayName: "Reach", - fileName: "reachbadge", - authorDiscordId: "338806780446638082", - }, - { - displayName: "Banning Legends", - fileName: "noentrygold", - authorDiscordId: "338806780446638082", - }, - { - displayName: "Banning Legends 2nd", - fileName: "noentrysilver", - authorDiscordId: "338806780446638082", - }, - { - displayName: "Banning Legends 3rd", - fileName: "noentrybronze", - authorDiscordId: "338806780446638082", - }, - { - displayName: "Weapon Lockdown", - fileName: "octoshot", - authorDiscordId: "338806780446638082", - }, - { - displayName: "Tony Tony Challenge", - fileName: "tonytonyc", - authorDiscordId: "338806780446638082", - }, - { - displayName: "A41 GG Gold Bracket", - fileName: "newa41gggold", - authorDiscordId: "338806780446638082", - }, - { - displayName: "A41 GG Silver Bracket", - fileName: "newa41ggsilver", - authorDiscordId: "338806780446638082", - }, - { - displayName: "A41 GG Bronze Bracket", - fileName: "newa41ggbronze", - authorDiscordId: "338806780446638082", - }, - { - displayName: "A41 GG Iron Bracket", - fileName: "newa41ggiron", - authorDiscordId: "338806780446638082", - }, - { - displayName: "MIKU MIKU BEAM!!! Lower Brackets", - fileName: "rottenmiku", - authorDiscordId: "338806780446638082", - }, - { - displayName: "MIKU MIKU BEAM!!! Teto Takeover!", - fileName: "hatsunemikuteto", - authorDiscordId: "338806780446638082", - }, - { - displayName: "MIKU MIKU BEAM!!! Sakura Edition", - fileName: "sakuramiku", - authorDiscordId: "338806780446638082", - }, - { - displayName: "Inkstrike Invitational", - fileName: "inkstrikeinv", - authorDiscordId: "789943264370884708", - }, - { - displayName: "All 4 One: Clam Blitz", - fileName: "newa41cb", - authorDiscordId: "338806780446638082", - }, - { - displayName: "All 4 One: Rainmaker", - fileName: "newa41rm", - authorDiscordId: "338806780446638082", - }, - { - displayName: "All 4 One: Splat Zones", - fileName: "newa41sz", - authorDiscordId: "338806780446638082", - }, - { - displayName: "All 4 One: Tower Control", - fileName: "newa41tc", - authorDiscordId: "338806780446638082", - }, - { - displayName: "Climb The Spire", - fileName: "climbspire", - authorDiscordId: "338806780446638082", - }, - { - displayName: "TeaCup", - fileName: "teabag", - authorDiscordId: "338806780446638082", - }, - { - displayName: "Mug Cup Mini", - fileName: "mugcupmini", - authorDiscordId: "338806780446638082", - }, - { - displayName: "Token Of Appreciation", - fileName: "bucketmeow12", - authorDiscordId: "1170249805373657093", - }, - { - displayName: "Tough Tides", - fileName: "wave1234567_4", - authorDiscordId: "1170249805373657093", - }, - { - displayName: "Dr. Meowser's Cat Food Bowl", - fileName: "catfoodbowl", - authorDiscordId: "324396128906903552", - }, - { - displayName: "Charger Assault", - fileName: "vchargersplash", - authorDiscordId: "338806780446638082", - }, - { - displayName: "MIKU MIKU BEAM!!!", - fileName: "hatsunemiku", - authorDiscordId: "338806780446638082", - }, - { - displayName: "New InkLAN", - fileName: "pinknes", - authorDiscordId: "338806780446638082", - }, - { - displayName: "Squids For Palestinian Kids", - fileName: "three_course_pal", - authorDiscordId: "338806780446638082", - }, - { - displayName: "Golden Brush Award", - fileName: "goldenbrush", - authorDiscordId: "338806780446638082", - }, - { - displayName: "Academy Showcase", - fileName: "academy_showcase", - authorDiscordId: "643355948265766912", - }, - { - displayName: "Gun (Winning 50 Calibur League)", - fileName: "50-cal-fir", - authorDiscordId: "530093822806458368", - }, - { - displayName: "Gold Bullet (Qualifying for 50 Calibur League)", - fileName: "50-cal-sec", - authorDiscordId: "530093822806458368", - }, - { - displayName: "Silver Bullet (Winning Silver Bracket 50 Calibur)", - fileName: "50-cal-thi", - authorDiscordId: "530093822806458368", - }, - { - displayName: "Turf War Takedown", - fileName: "turf1230", - authorDiscordId: "1170249805373657093", - }, - { - displayName: "Turf War Takedown (Special)", - fileName: "turf12300", - authorDiscordId: "1170249805373657093", - }, - { - displayName: "Peashooter Achievement", - fileName: "peashooter", - authorDiscordId: "789943264370884708", - }, - { - displayName: "TFS Tourneys", - fileName: "tfstourney", - authorDiscordId: "789943264370884708", - }, - { - displayName: "Liftoff", - fileName: "liftoff", - authorDiscordId: "789943264370884708", - }, - { - displayName: "Treetop Tussle", - fileName: "tree", - authorDiscordId: "789943264370884708", - }, - { - displayName: "Treetop Tussle: Gold Edition", - fileName: "treegold", - authorDiscordId: "789943264370884708", - }, - { - displayName: "Prize Fight", - fileName: "prizefight", - authorDiscordId: "789943264370884708", - }, - { - displayName: "Prize Fight: Gold Edition", - fileName: "prizefightgold", - authorDiscordId: "789943264370884708", - }, - { - displayName: "Break Zach's Bank", - fileName: "breakzachsbank", - authorDiscordId: "528851510222782474", - }, - { - displayName: "Tristrike Tuesday (D5 CAPPED)", - fileName: "tristriketuesday", - authorDiscordId: "789943264370884708", - }, - { - displayName: "VERSUS THE WORLD", - fileName: "cookie", - authorDiscordId: "528851510222782474", - }, - { - displayName: "Not Enough Liter", - fileName: "custom_e-liter", - authorDiscordId: "352207524390240257", - }, - { - displayName: "Blast Away!", - fileName: "lunablaster", - authorDiscordId: "342369454719631361", - }, - { - displayName: "[Original Message Deleted]", - fileName: "original-message-deleted", - authorDiscordId: "751912670403362836", - }, - { - displayName: "Shiny Wooper Achievement", - fileName: "shinywooper", - authorDiscordId: "528851510222782474", - }, - { - displayName: "OCE Open", - fileName: "ausflag", - authorDiscordId: "1170249805373657093", - }, - { - displayName: "TableTurf: RISE", - fileName: "tableturf-rise", - authorDiscordId: "528851510222782474", - }, - { - displayName: "A Special Tournament", - fileName: "chara_special", - authorDiscordId: "1081428018666422313", - }, - { - displayName: "Dolphin Showdown", - fileName: "dolphin", - authorDiscordId: "528851510222782474", - }, - { - displayName: "Raid Weekend", - fileName: "raid-weekend", - authorDiscordId: "354880982890971136", - }, - { - displayName: "It's Dangerous To Go Alone Master Bracket", - fileName: "idtgamb", - authorDiscordId: "354880982890971136", - }, - { - displayName: "Lone Sailor", - fileName: "lone_sailor", - authorDiscordId: "354880982890971136", - }, - { - displayName: "Pinch Zach's Bank", - fileName: "pinchzachsbank", - authorDiscordId: "528851510222782474", - }, - { - displayName: "Pou Basket", - fileName: "pou", - authorDiscordId: "285896534380511234", - }, - { - displayName: "Blue Pou Achievement", - fileName: "pou_b", - authorDiscordId: "285896534380511234", - }, - { - displayName: "Junior's Draft", - fileName: "jrs_draft", - authorDiscordId: "118724226994667523", - }, - { - displayName: "Paraflinch", - fileName: "paraflinch", - authorDiscordId: "528851510222782474", - }, - { - displayName: "GHOST TYPE RUSH", - fileName: "gengar", - authorDiscordId: "528851510222782474", - }, - { - displayName: "GHOST TYPE RUSH SHINY EDITION", - fileName: "gengarshiny", - authorDiscordId: "528851510222782474", - }, - { - displayName: "Just Daytona 1-5", - fileName: "daytonaspeedweeks1st", - authorDiscordId: "528851510222782474", - }, - { - displayName: "Just Daytona 2nd 1-5", - fileName: "daytonaspeedweeks2nd", - authorDiscordId: "528851510222782474", - }, - { - displayName: "Shark Tank (Gold)", - fileName: "sharktank1st", - authorDiscordId: "528851510222782474", - }, - { - displayName: "Shark Tank (Silver)", - fileName: "sharktank2nd", - authorDiscordId: "528851510222782474", - }, - { - displayName: "Shark Tank (Bronze)", - fileName: "sharktank3rd", - authorDiscordId: "528851510222782474", - }, - { - displayName: "Power Pair Showdown", - fileName: "pps", - authorDiscordId: "789943264370884708", - }, - { - displayName: "Splat'n'Go", - fileName: "splat-n-go", - authorDiscordId: "570323825669963972", - }, - { - displayName: "Minus One Cup", - fileName: "minus-one-cup", - authorDiscordId: "569271521776762896", - }, - { - displayName: "Minus One Cup (Coach)", - fileName: "minus-one-cup-coach", - authorDiscordId: "569271521776762896", - }, - { - displayName: "Minus One Open", - fileName: "minus-one-open", - authorDiscordId: "569271521776762896", - }, - { - displayName: "Reef Reunion (100 KT Power)", - fileName: "ktlow", - authorDiscordId: "1170249805373657093", - }, - { - displayName: "Reef Reunion (500 KT Power)", - fileName: "ktmed", - authorDiscordId: "1170249805373657093", - }, - { - displayName: "Reef Reunion (999 KT Power)", - fileName: "kthigh", - authorDiscordId: "1170249805373657093", - }, - { - displayName: "Heaven 2 Ocean Qualifer", - fileName: "heaven2ocean", - authorDiscordId: "528851510222782474", - }, - { - displayName: "Seabattle", - fileName: "seabattle", - authorDiscordId: "528851510222782474", - }, - { - displayName: "Dodge Rollers", - fileName: "splat_dualie", - authorDiscordId: "218883697007394816", - }, - { - displayName: "Breeze LAN (1st)", - fileName: "breeze", - authorDiscordId: "342369454719631361", - }, - { - displayName: "Breeze LAN (2nd)", - fileName: "breeze2", - authorDiscordId: "342369454719631361", - }, - { - displayName: "Breeze LAN (3rd)", - fileName: "breeze3", - authorDiscordId: "342369454719631361", - }, - { - displayName: "Splat Vibes LAN", - fileName: "vibesfirst", - authorDiscordId: "342369454719631361", - }, - { - displayName: "Splat Vibes LAN (Top 4)", - fileName: "vibessecond", - authorDiscordId: "342369454719631361", - }, - { - displayName: "Splat Legacy LAN", - fileName: "splatlegacy", - authorDiscordId: "342369454719631361", - }, - { - displayName: "Ink Practice", - fileName: "inkpractice", - authorDiscordId: "342369454719631361", - }, - { - displayName: "Breeze LAN (Salmon Run)", - fileName: "breezesr", - authorDiscordId: "342369454719631361", - }, - { - displayName: "Fountain of Dreams", - fileName: "fountain_of_dreams", - authorDiscordId: "164695301007998979", - }, - { - displayName: "Scrap Bin (Smidge)", - fileName: "cc-smidge", - authorDiscordId: "148874365105078272", - }, - { - displayName: "Supply Closet (Smudge)", - fileName: "cc-smudge", - authorDiscordId: "148874365105078272", - }, - { - displayName: "THE GLAZE GAUNTLET", - fileName: "glaze", - authorDiscordId: "528851510222782474", - }, - { - displayName: "Frostbite Ascent", - fileName: "frostbitegold2x", - authorDiscordId: "354880982890971136", - }, - { - displayName: "Frostbite Ascent (Summit Bracket)", - fileName: "frostbitesilver2x", - authorDiscordId: "354880982890971136", - }, - { - displayName: "Frostbite Ascent (Top 8)", - fileName: "frostbitebase2x", - authorDiscordId: "354880982890971136", - }, - { - displayName: "Biggest Fish in the Sea", - fileName: "bfis", - authorDiscordId: "629773997822967819", - }, - { - displayName: "Squeaky Clean Scrap", - fileName: "wiper", - authorDiscordId: "528851510222782474", - }, - { - displayName: "Chi-Shoals", - fileName: "chishoals", - authorDiscordId: "528851510222782474", - }, - { - displayName: "Shark Tank: Deep Waters", - fileName: "blahajopen", - authorDiscordId: "528851510222782474", - }, - { - displayName: "SquidWest Events", - fileName: "sw", - authorDiscordId: "528851510222782474", - }, - { - displayName: "Get Coupled", - fileName: "getcoupled", - authorDiscordId: "418496741088690177", - }, - { - displayName: "Twin Squiddies", - fileName: "twinsquiddies", - authorDiscordId: "789943264370884708", - }, - { - displayName: "Abandon Ship", - fileName: "ship", - authorDiscordId: "528851510222782474", - }, - { - displayName: "H-Town Splashdown", - fileName: "texaslan", - authorDiscordId: "528851510222782474", - }, - { - displayName: "Inkray Cup", - fileName: "inkraycup", - authorDiscordId: "842371851606949909", - }, - { - displayName: "Buried Treasure", - fileName: "treasure", - authorDiscordId: "528851510222782474", - }, - { - displayName: "Anarchy NoVA", - fileName: "punkshrimp", - authorDiscordId: "528851510222782474", - }, - { - displayName: "Sunday Run", - fileName: "sunday-run", - authorDiscordId: "570323825669963972", - }, - { - displayName: "Specials To The Power Of Four!", - fileName: "special4", - authorDiscordId: "1170249805373657093", - }, - { - displayName: "Badge Palooza", - fileName: "badgepalooza", - authorDiscordId: "528851510222782474", - }, - { - displayName: "SpaceDog Showdown", - fileName: "spacedog", - authorDiscordId: "528851510222782474", - }, - { - displayName: "SpaceDog Showdown (Jolly Edition)", - fileName: "spacedogjolly", - authorDiscordId: "528851510222782474", - }, - { - displayName: "Mimikyu Monday", - fileName: "mimikyu", - authorDiscordId: "528851510222782474", - }, - { - displayName: "Zones Royale", - fileName: "szroyale", - authorDiscordId: "528851510222782474", - }, - { - displayName: "Bastard München", - fileName: "muchen", - authorDiscordId: "528851510222782474", - }, - { - displayName: "Eggs and Salad", - fileName: "saladbowl", - authorDiscordId: "336683473714544641", - }, - { - displayName: "Splashdown Saturday", - fileName: "splashdownsat", - authorDiscordId: "631246535560265749", - }, - { - displayName: "Low Tier Bouts", - fileName: "low-tier-bouts", - authorDiscordId: "430487372015206410", - }, - { - displayName: "Level Up", - fileName: "magikarp", - authorDiscordId: "528851510222782474", - }, - { - displayName: "Level Up: Shiny Hunt", - fileName: "shinymagikarp", - authorDiscordId: "528851510222782474", - }, - { - displayName: "FC Barcha", - fileName: "barcha", - authorDiscordId: "528851510222782474", - }, - { - displayName: "Manshine City", - fileName: "manshine", - authorDiscordId: "528851510222782474", - }, - { - displayName: "Catgirl Challenge", - fileName: "headband", - authorDiscordId: "789943264370884708", - }, - { - displayName: "Reef-Lux Achievement", - fileName: "flux", - authorDiscordId: "631246535560265749", - }, - { - displayName: "Meet Your Match", - fileName: "matchmeet", - authorDiscordId: "631246535560265749", - }, - { - displayName: "Proxy Training", - fileName: "eous", - authorDiscordId: "528851510222782474", - }, - { - displayName: "Ubers", - fileName: "ubers", - authorDiscordId: "528851510222782474", - }, - { - displayName: "Zones Classic", - fileName: "szclassic", - authorDiscordId: "528851510222782474", - }, - { - displayName: "P.X.G", - fileName: "pxg", - authorDiscordId: "528851510222782474", - }, - { - displayName: "Low Tier Experiments", - fileName: "lte_badge", - authorDiscordId: "430487372015206410", - }, - { - displayName: "JJaeigh's Jamboree", - fileName: "jamboree", - authorDiscordId: "528851510222782474", - }, - { - displayName: "Mesozoic Mayhem: Triceratrials", - fileName: "tricera", - authorDiscordId: "352207524390240257", - }, - { - displayName: "Mesozoic Mayhem: Gold Triceratrials", - fileName: "triceragold", - authorDiscordId: "352207524390240257", - }, - { - displayName: "Mesozoic Mayhem: Special Spino", - fileName: "spino", - authorDiscordId: "352207524390240257", - }, - { - displayName: "Mesozoic Mayhem: Gold Special Spino", - fileName: "spinogold", - authorDiscordId: "352207524390240257", - }, - { - displayName: "Mesozoic Mayhem: Dreadnoughtus Undefeated", - fileName: "dreadnoughtus", - authorDiscordId: "352207524390240257", - }, - { - displayName: "The Jauntlet", - fileName: "jauntlet", - authorDiscordId: "528851510222782474", - }, - { - displayName: "Barnacle Bash", - fileName: "barnacle-bash", - authorDiscordId: "181270348262539265", - }, - { - displayName: "A Splatoon Brazil Tournament", - fileName: "brflgx", - authorDiscordId: "701870845550657677", - }, - { - displayName: "Turf War Tomatoes", - fileName: "saladbowl_tomato", - authorDiscordId: "336683473714544641", - }, - { - displayName: "Eggs and Salad: Birthday Edition", - fileName: "birthday_cake", - authorDiscordId: "336683473714544641", - }, - { - displayName: "Wheel of Names", - fileName: "ferris_wheel", - authorDiscordId: "336683473714544641", - }, - { - displayName: "Revo'Cup", - fileName: "revocup", - authorDiscordId: "309327923129745409", - }, - { - displayName: "Soul League (Div 1)", - fileName: "soulcupgold", - authorDiscordId: "309327923129745409", - }, - { - displayName: "Soul League (Other Div)", - fileName: "soulcupsilver", - authorDiscordId: "309327923129745409", - }, - { - displayName: "Level Up x2 - Leveled Up!", - fileName: "gyra", - authorDiscordId: "528851510222782474", - }, - { - displayName: "Level Up: Shiny Hunt x2 - Leveled Up!", - fileName: "shinygyra", - authorDiscordId: "528851510222782474", - }, - { - displayName: "New Game +", - fileName: "new-game-plus", - authorDiscordId: "216653023252840449", - }, - { - displayName: "Twisted Toe", - fileName: "twistedtoe", - authorDiscordId: "1320944066002681876", - }, - { - displayName: "TOECAR", - fileName: "toecar", - authorDiscordId: "1320944066002681876", - }, - { - displayName: "CoffeeCup", - fileName: "coffeecup", - authorDiscordId: "1320944066002681876", - }, - { - displayName: "Good Morning Chat", - fileName: "gator", - authorDiscordId: "528851510222782474", - }, - { - displayName: "Clutch United Squid Storm LAN Tournament", - fileName: "clutch_united", - authorDiscordId: "336683473714544641", - }, - { - displayName: "Re Al", - fileName: "real", - authorDiscordId: "528851510222782474", - }, - { - displayName: "Blue Lock", - fileName: "bluelock", - authorDiscordId: "528851510222782474", - }, - { - displayName: "FULLWIPE LAN", - fileName: "fullwipe", - authorDiscordId: "570323825669963972", - }, - { - displayName: "FULLWIPE LAN (2nd)", - fileName: "fullwipe_silver", - authorDiscordId: "570323825669963972", - }, - { - displayName: "FULLWIPE LAN (3rd)", - fileName: "fullwipe_bronze", - authorDiscordId: "570323825669963972", - }, - { - displayName: "Torneo Crab Cancel Perfect and Shadow", - fileName: "crab_tank", - authorDiscordId: "336683473714544641", - }, - { - displayName: "Anarchy Adventures", - fileName: "s50badge", - authorDiscordId: "336683473714544641", - }, - { - displayName: "[OMD] Bingo Club", - fileName: "bingo-club", - authorDiscordId: "751912670403362836", - }, - { - displayName: "Florida Collegiate Draft Cup", - fileName: "FLcollegiate", - authorDiscordId: "285504780154044416", - }, - { - displayName: "Chao Garden", - fileName: "chao", - authorDiscordId: "528851510222782474", - }, - { - displayName: "Meet Your Match Counterpick Gauntlet", - fileName: "matchmeetex", - authorDiscordId: "631246535560265749", - }, - { - displayName: "Calm Before the Storm", - fileName: "calmbefore", - authorDiscordId: "631246535560265749", - }, - { - displayName: "Big Swig", - fileName: "swig", - authorDiscordId: "534502084134043648", - }, - { - displayName: "Art Supplies Pencil Award", - fileName: "artsupplies", - authorDiscordId: "1320944066002681876", - }, - { - displayName: "Art Supplies Pencil Award (Silver)", - fileName: "artsuppliessilver", - authorDiscordId: "1320944066002681876", - }, - { - displayName: "Art Supplies Pencil Award (Bronze)", - fileName: "artsuppliesbronze", - authorDiscordId: "1320944066002681876", - }, - { - displayName: "Ranked Refreshments: Lemon", - fileName: "ranked_refreshments_x_3", - authorDiscordId: "336683473714544641", - }, - { - displayName: "Ranked Refreshments: Lime", - fileName: "ranked_refreshments_4_7", - authorDiscordId: "336683473714544641", - }, - { - displayName: "Ranked Refreshments: Dragonfruit", - fileName: "ranked_refreshments_8_11", - authorDiscordId: "336683473714544641", - }, - { - displayName: "5 TSO Tournaments", - fileName: "mew", - authorDiscordId: "528851510222782474", - }, - { - displayName: "10 TSO Tournaments", - fileName: "shinymew", - authorDiscordId: "528851510222782474", - }, - { - displayName: "Splatoon 1 Tournament (Callie)", - fileName: "calliesit", - authorDiscordId: "336683473714544641", - }, - { - displayName: "Splatoon 1 Tournament (Marie)", - fileName: "mariesit", - authorDiscordId: "336683473714544641", - }, - { - displayName: "Pikmin Bloom (Bronze)", - fileName: "rockleaf", - authorDiscordId: "534502084134043648", - }, - { - displayName: "Pikmin Bloom (Silver)", - fileName: "rockbud", - authorDiscordId: "534502084134043648", - }, - { - displayName: "Pikmin Bloom (Gold)", - fileName: "rockflower", - authorDiscordId: "534502084134043648", - }, - { - displayName: "Dynamo Roller", - fileName: "dynamo", - authorDiscordId: "534502084134043648", - }, - { - displayName: "Squidforce Cup", - fileName: "squidtheforce", - authorDiscordId: "1320944066002681876", - }, - { - displayName: "Takoroka Cup", - fileName: "takorokacup", - authorDiscordId: "1320944066002681876", - }, - { - displayName: "Zekko Cup", - fileName: "zekkocup", - authorDiscordId: "1320944066002681876", - }, - { - displayName: "Division 1 (Watermelon)", - fileName: "tso1watermelon", - authorDiscordId: "338806780446638082", - }, - { - displayName: "Division 2 (Pineapple)", - fileName: "tso2pineapple", - authorDiscordId: "338806780446638082", - }, - { - displayName: "Division 3 (Peach)", - fileName: "tso3peach", - authorDiscordId: "338806780446638082", - }, - { - displayName: "Division 4 (Cherry)", - fileName: "tso4cherry", - authorDiscordId: "338806780446638082", - }, - { - displayName: "Division 5 (Blueberry)", - fileName: "tso5blueberry", - authorDiscordId: "338806780446638082", - }, - { - displayName: "Ride the Wave", - fileName: "wave-breaker", - authorDiscordId: "534502084134043648", - }, - { - displayName: "Ink Torrent", - fileName: "ink-torrent", - authorDiscordId: "534502084134043648", - }, - { - displayName: "Full Auto", - fileName: "full-auto", - authorDiscordId: "534502084134043648", - }, - { - displayName: "fractured cup", - fileName: "frcup", - authorDiscordId: "960213930586824766", - }, - { - displayName: "fractured cup gold", - fileName: "frcpgd", - authorDiscordId: "960213930586824766", - }, - { - displayName: "ENA (Dream BBQ)", - fileName: "enabbq", - authorDiscordId: "528851510222782474", - }, - { - displayName: "ENA", - fileName: "happyena", - authorDiscordId: "528851510222782474", - }, - { - displayName: "Stellaris Phantasm: Crimson Bracket", - fileName: "crimson", - authorDiscordId: "617399529532293150", - }, - { - displayName: "Stellaris Phantasm: Lumière Bracket", - fileName: "lumiere", - authorDiscordId: "617399529532293150", - }, - { - displayName: "Stellaris Phantasm: Serenade Bracket", - fileName: "serenade", - authorDiscordId: "617399529532293150", - }, - { - displayName: "Moo Moo Cup", - fileName: "meadowscow", - authorDiscordId: "528851510222782474", - }, -]; diff --git a/migrations/085-fix-badge-names.js b/migrations/085-fix-badge-names.js new file mode 100644 index 000000000..cfee0cc89 --- /dev/null +++ b/migrations/085-fix-badge-names.js @@ -0,0 +1,7 @@ +export function up(db) { + db.transaction(() => { + db.prepare( + /* sql */ `update "Badge" set "code" = 'fl-collegiate' where "code" = 'FLcollegiate'`, + ).run(); + })(); +} diff --git a/package.json b/package.json index ab87e967a..2fa07f838 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "migrate": "ley", "check-translation-jsons": "node --experimental-strip-types scripts/check-translation-jsons.ts", "check-translation-jsons:no-write": "node --experimental-strip-types scripts/check-translation-jsons.ts --no-write", + "check-homemade-badges": "node --experimental-strip-types scripts/check-homemade-badges.ts", "refresh-prod-db": "node --experimental-strip-types scripts/refresh-prod-db.ts && cross-env DB_PATH=db-prod.sqlite3 npm run migrate up", "biome:check": "npx @biomejs/biome check .", "biome:fix": "npx @biomejs/biome check --write .", diff --git a/public/static-assets/badges/FLcollegiate.avif b/public/static-assets/badges/fl-collegiate.avif similarity index 100% rename from public/static-assets/badges/FLcollegiate.avif rename to public/static-assets/badges/fl-collegiate.avif diff --git a/public/static-assets/badges/FLcollegiate.gif b/public/static-assets/badges/fl-collegiate.gif similarity index 100% rename from public/static-assets/badges/FLcollegiate.gif rename to public/static-assets/badges/fl-collegiate.gif diff --git a/public/static-assets/badges/FLcollegiate.png b/public/static-assets/badges/fl-collegiate.png similarity index 100% rename from public/static-assets/badges/FLcollegiate.png rename to public/static-assets/badges/fl-collegiate.png diff --git a/scripts/check-homemade-badges.ts b/scripts/check-homemade-badges.ts new file mode 100644 index 000000000..a06cf86d9 --- /dev/null +++ b/scripts/check-homemade-badges.ts @@ -0,0 +1,52 @@ +import fs from "node:fs"; +import path from "node:path"; +import { z } from "zod"; +import badgesJson from "../app/features/badges/homemade.json" with { + type: "json", +}; + +const schema = z.record( + z.string().regex(/^[a-z0-9-_]+$/), + z.object({ + displayName: z.string().min(1).max(50), + authorDiscordId: z.string().regex(/^\d{17,19}$/), + }), +); + +const parsedBadges = schema.safeParse(badgesJson); +if (!parsedBadges.success) { + console.error( + "Invalid homemade.json format", + JSON.stringify(parsedBadges.error), + ); + process.exit(1); +} + +const badges = parsedBadges.data; + +// check keys in alphabetical order +let lastKey = ""; +for (const key of Object.keys(badges)) { + if (key.localeCompare(lastKey) < 0) { + console.error(`Invalid key order in homemade.json: ${lastKey} > ${key}`); + process.exit(1); + } + lastKey = key; +} + +// check each key has the 3 matching files in the right location +const badgesLocation = path.join("public", "static-assets", "badges"); + +for (const fileName of Object.keys(badges)) { + for (const ext of ["png", "avif", "gif"]) { + const filePath = path.join(badgesLocation, `${fileName}.${ext}`); + if (!fs.existsSync(filePath)) { + console.error( + `Missing file for badge ${fileName}: ${filePath} does not exist`, + ); + process.exit(1); + } + } +} + +console.info("Homemade badges check passed"); diff --git a/scripts/sync-homemade-badges.ts b/scripts/sync-homemade-badges.ts index 0f3a2ba72..633d7073a 100644 --- a/scripts/sync-homemade-badges.ts +++ b/scripts/sync-homemade-badges.ts @@ -1,27 +1,17 @@ import "dotenv/config"; import { db } from "~/db/sql"; -import { homemadeBadges } from "~/features/badges/homemade"; +import homemadeBadges from "~/features/badges/homemade.json"; import { logger } from "~/utils/logger"; async function main() { let deleted = 0; let updated = 0; - const isGood = validateHomemadeBadges(); - - if (!isGood) { - logger.error( - "Homemade badges are not valid, skipping badge update process", - ); - return; - } - // update existing for (const existingBadge of await homemadeBadgesInDb()) { - const badge = homemadeBadges.find( - (badge) => badge.fileName === existingBadge.code, - ); + const badge = + homemadeBadges[existingBadge.code as keyof typeof homemadeBadges]; if (!badge) { await deleteBadge(existingBadge.id); @@ -55,9 +45,9 @@ async function main() { let added = 0; // add new - for (const badge of homemadeBadges) { + for (const [fileName, badge] of Object.entries(homemadeBadges)) { const existing = homemadeAfterUpdates.find( - (existingBadge) => badge.fileName === existingBadge.code, + (existingBadge) => fileName === existingBadge.code, ); if (existing) { @@ -67,13 +57,13 @@ async function main() { const author = await findUserByDiscordId(badge.authorDiscordId); if (!author) { logger.warn( - `Author not found for badge with fileName: ${badge.fileName}, skipping`, + `Author not found for badge with fileName: ${fileName}, skipping`, ); continue; } await addBadge({ - code: badge.fileName, + code: fileName, displayName: badge.displayName, authorId: author.id, }); @@ -86,20 +76,6 @@ async function main() { ); } -function validateHomemadeBadges() { - const names = new Set(); - - for (const badge of homemadeBadges) { - if (names.has(badge.fileName)) { - return false; - } - - names.add(badge.fileName); - } - - return true; -} - async function homemadeBadgesInDb() { return db .selectFrom("Badge")