├── .devcontainer ├── Dockerfile └── devcontainer.json ├── .github ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── ISSUE_TEMPLATE │ ├── bug_report.yml │ ├── config.yml │ └── feature_request.yml ├── PULL_REQUEST_TEMPLATE.md ├── issue_labeler.yml ├── pr_labeler.yml └── workflows │ ├── ci.yml │ ├── deploy.yml │ ├── issue_labeler.yml │ └── pr_labeler.yml ├── .gitignore ├── .gitmodules ├── .nvmrc ├── .swcrc ├── .vscode ├── i18n-ally-custom-framework.yml ├── launch.json ├── settings.json └── tasks.json ├── Cargo.toml ├── LICENSE ├── README.md ├── apps ├── api │ ├── eslint.config.js │ ├── package.json │ ├── src │ │ ├── app.controller.ts │ │ ├── app.module.ts │ │ ├── auth │ │ │ ├── auth.controller.ts │ │ │ ├── auth.decorator.ts │ │ │ ├── auth.guard.ts │ │ │ ├── auth.module.ts │ │ │ ├── auth.role.ts │ │ │ ├── auth.service.ts │ │ │ └── index.ts │ │ ├── commands │ │ │ ├── commands.controller.ts │ │ │ ├── commands.module.ts │ │ │ ├── commands.service.ts │ │ │ └── index.ts │ │ ├── dtos │ │ │ ├── cache.dto.ts │ │ │ ├── cached-player.dto.ts │ │ │ ├── command.dto.ts │ │ │ ├── guild-leaderboard.dto.ts │ │ │ ├── guild-rankings.dto.ts │ │ │ ├── guild.dto.ts │ │ │ ├── head.dto.ts │ │ │ ├── index.ts │ │ │ ├── key.dto.ts │ │ │ ├── player-group.dto.ts │ │ │ ├── player-leaderboard.dto.ts │ │ │ ├── player-rankings.dto.ts │ │ │ ├── player-search.dto.ts │ │ │ ├── player.dto.ts │ │ │ ├── session.dto.ts │ │ │ ├── update-player.dto.ts │ │ │ ├── user.dto.ts │ │ │ ├── uuid.dto.ts │ │ │ └── verify-code.dto.ts │ │ ├── guild │ │ │ ├── guild.controller.ts │ │ │ ├── guild.module.ts │ │ │ ├── guild.service.ts │ │ │ ├── index.ts │ │ │ └── leaderboards │ │ │ │ ├── guild-leaderboard.controller.ts │ │ │ │ └── guild-leaderboard.service.ts │ │ ├── hypixel-resources │ │ │ ├── hypixel-resources.controller.ts │ │ │ ├── hypixel-resources.module.ts │ │ │ └── index.ts │ │ ├── hypixel │ │ │ ├── hypixel.module.ts │ │ │ ├── hypixel.service.ts │ │ │ └── index.ts │ │ ├── index.ts │ │ ├── leaderboards │ │ │ ├── index.ts │ │ │ └── leaderboard.service.ts │ │ ├── player │ │ │ ├── index.ts │ │ │ ├── leaderboards │ │ │ │ ├── player-leaderboard.controller.ts │ │ │ │ └── player-leaderboard.service.ts │ │ │ ├── player.controller.ts │ │ │ ├── player.module.ts │ │ │ ├── player.service.ts │ │ │ └── search │ │ │ │ ├── player-search.controller.ts │ │ │ │ └── player-search.service.ts │ │ ├── redis │ │ │ ├── index.ts │ │ │ ├── redis.constants.ts │ │ │ ├── redis.core-module.ts │ │ │ ├── redis.decorators.ts │ │ │ ├── redis.interfaces.ts │ │ │ ├── redis.module.ts │ │ │ └── redis.utils.ts │ │ ├── sentry │ │ │ ├── index.ts │ │ │ └── sentry.interceptor.ts │ │ ├── session │ │ │ ├── index.ts │ │ │ ├── session.controller.ts │ │ │ ├── session.model.ts │ │ │ ├── session.module.ts │ │ │ └── session.service.ts │ │ ├── skin │ │ │ ├── index.ts │ │ │ ├── skin.controller.ts │ │ │ ├── skin.module.ts │ │ │ └── skin.service.ts │ │ └── user │ │ │ ├── index.ts │ │ │ ├── user.controller.ts │ │ │ ├── user.module.ts │ │ │ └── user.service.ts │ ├── tsconfig.json │ └── views │ │ └── redoc.handlebars ├── discord-bot │ ├── .swcrc │ ├── eslint.config.js │ ├── package.json │ ├── src │ │ ├── commands │ │ │ ├── arcade │ │ │ │ ├── arcade.command.tsx │ │ │ │ ├── arcade.profile.tsx │ │ │ │ └── modes │ │ │ │ │ ├── blocking-dead.tsx │ │ │ │ │ ├── bounty-hunters.tsx │ │ │ │ │ ├── creeper-attack.tsx │ │ │ │ │ ├── dragon-wars.tsx │ │ │ │ │ ├── dropper.tsx │ │ │ │ │ ├── ender-spleef.tsx │ │ │ │ │ ├── farm-hunt.tsx │ │ │ │ │ ├── football.tsx │ │ │ │ │ ├── galaxy-wars.tsx │ │ │ │ │ ├── hide-and-seek.tsx │ │ │ │ │ ├── hole-in-the-wall.tsx │ │ │ │ │ ├── hypixel-says.tsx │ │ │ │ │ ├── index.tsx │ │ │ │ │ ├── mini-walls.tsx │ │ │ │ │ ├── overall-arcade.tsx │ │ │ │ │ ├── party-games.tsx │ │ │ │ │ ├── pixel-painters.tsx │ │ │ │ │ ├── pixel-party.tsx │ │ │ │ │ ├── seasonal.tsx │ │ │ │ │ ├── throw-out.tsx │ │ │ │ │ └── zombies.tsx │ │ │ ├── arenabrawl │ │ │ │ ├── arenabrawl.command.tsx │ │ │ │ └── arenabrawl.profile.tsx │ │ │ ├── base.hypixel-command.ts │ │ │ ├── bedwars │ │ │ │ ├── bedwars-challenges.command.tsx │ │ │ │ ├── bedwars-challenges.profile.tsx │ │ │ │ ├── bedwars.command.tsx │ │ │ │ └── bedwars.profile.tsx │ │ │ ├── blitzsg │ │ │ │ ├── blitzsg.command.tsx │ │ │ │ └── blitzsg.profile.tsx │ │ │ ├── buildbattle │ │ │ │ ├── buildbattle.command.tsx │ │ │ │ └── buildbattle.profile.tsx │ │ │ ├── challenges │ │ │ │ ├── challenges.command.tsx │ │ │ │ └── challenges.profile.tsx │ │ │ ├── config │ │ │ │ ├── badge.command.tsx │ │ │ │ ├── demo.profile.tsx │ │ │ │ ├── language.command.tsx │ │ │ │ └── theme.command.tsx │ │ │ ├── copsandcrims │ │ │ │ ├── copsandcrims.command.tsx │ │ │ │ └── copsandcrims.profile.tsx │ │ │ ├── deprecated │ │ │ │ ├── bridge.command.tsx │ │ │ │ ├── daily.command.tsx │ │ │ │ ├── dropper.command.tsx │ │ │ │ ├── historical.base.tsx │ │ │ │ ├── lastDay.command.tsx │ │ │ │ ├── lastMonth.command.tsx │ │ │ │ ├── lastWeek.command.tsx │ │ │ │ ├── monthly.command.tsx │ │ │ │ ├── recentgames.command.tsx │ │ │ │ ├── weekly.command.tsx │ │ │ │ └── yesterday.command.tsx │ │ │ ├── duels │ │ │ │ ├── duels.command.tsx │ │ │ │ ├── duels.profile.tsx │ │ │ │ └── tables │ │ │ │ │ ├── bridge-duels.table.tsx │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── multi-duels-game-mode.table.tsx │ │ │ │ │ ├── single-duels-game-mode.table.tsx │ │ │ │ │ ├── titles.table.tsx │ │ │ │ │ └── uhc-duels.table.tsx │ │ │ ├── events │ │ │ │ ├── event-colors.ts │ │ │ │ ├── events.command.tsx │ │ │ │ └── events.profile.tsx │ │ │ ├── gamecounts.command.ts │ │ │ ├── general │ │ │ │ ├── general.command.tsx │ │ │ │ ├── general.profile.tsx │ │ │ │ ├── historical-general.profile.tsx │ │ │ │ └── hypixel.command.tsx │ │ │ ├── gtbhelper │ │ │ │ ├── find-solutions.ts │ │ │ │ ├── gtbhelpber.command.tsx │ │ │ │ └── gtbhelper.argument.ts │ │ │ ├── guild │ │ │ │ ├── gexp.table.tsx │ │ │ │ ├── guild-list.profile.tsx │ │ │ │ ├── guild-member.profile.tsx │ │ │ │ ├── guild-top.profile.tsx │ │ │ │ ├── guild-top.subcommand.tsx │ │ │ │ ├── guild.command.tsx │ │ │ │ └── guild.profile.tsx │ │ │ ├── historical │ │ │ │ └── session.command.tsx │ │ │ ├── info │ │ │ │ ├── help.command.ts │ │ │ │ ├── invite.command.ts │ │ │ │ └── ping.command.ts │ │ │ ├── leaderboards │ │ │ │ ├── base.leaderboard-command.tsx │ │ │ │ ├── guild-leaderboard.argument.ts │ │ │ │ ├── guild-leaderboard.subcommand.ts │ │ │ │ ├── leaderboard.profile.tsx │ │ │ │ ├── player-leaderboard.argument.ts │ │ │ │ └── player-leaderboard.command.ts │ │ │ ├── megawalls │ │ │ │ ├── megawalls.command.tsx │ │ │ │ └── megawalls.profile.tsx │ │ │ ├── minecraft │ │ │ │ ├── available.command.ts │ │ │ │ ├── cape.command.ts │ │ │ │ ├── colors.command.ts │ │ │ │ ├── server │ │ │ │ │ ├── server.argument.ts │ │ │ │ │ ├── server.command.tsx │ │ │ │ │ ├── server.profile.tsx │ │ │ │ │ └── server.util.ts │ │ │ │ ├── skin.command.tsx │ │ │ │ ├── text.command.tsx │ │ │ │ └── uuid.command.ts │ │ │ ├── murdermystery │ │ │ │ ├── murdermystery.command.tsx │ │ │ │ └── murdermystery.profile.tsx │ │ │ ├── paintball │ │ │ │ ├── paintball.command.tsx │ │ │ │ └── paintball.profile.tsx │ │ │ ├── parkour │ │ │ │ ├── parkour.command.tsx │ │ │ │ └── parkour.profile.tsx │ │ │ ├── pit │ │ │ │ ├── pit.command.tsx │ │ │ │ └── pit.profile.tsx │ │ │ ├── quake │ │ │ │ ├── quake.command.tsx │ │ │ │ └── quake.profile.tsx │ │ │ ├── quests │ │ │ │ ├── quests.command.tsx │ │ │ │ └── quests.profile.tsx │ │ │ ├── rankings │ │ │ │ ├── games.ts │ │ │ │ ├── positions.command.tsx │ │ │ │ ├── rankings.command.tsx │ │ │ │ └── rankings.profile.tsx │ │ │ ├── ratios │ │ │ │ ├── ratios.command.tsx │ │ │ │ └── ratios.profile.tsx │ │ │ ├── reset.command.ts │ │ │ ├── skywars │ │ │ │ ├── skywars-challenges.command.tsx │ │ │ │ ├── skywars-challenges.profile.tsx │ │ │ │ ├── skywars.command.tsx │ │ │ │ └── skywars.profile.tsx │ │ │ ├── smashheroes │ │ │ │ ├── smashheroes.command.tsx │ │ │ │ └── smashheroes.profile.tsx │ │ │ ├── socials │ │ │ │ └── socials.command.ts │ │ │ ├── speeduhc │ │ │ │ ├── speeduhc.command.tsx │ │ │ │ └── speeduhc.profile.tsx │ │ │ ├── status │ │ │ │ ├── status.command.tsx │ │ │ │ └── status.profile.tsx │ │ │ ├── tntgames │ │ │ │ ├── tntgames.command.tsx │ │ │ │ └── tntgames.profile.tsx │ │ │ ├── turbokartracers │ │ │ │ ├── turbokartracers.command.tsx │ │ │ │ └── turbokartracers.profile.tsx │ │ │ ├── uhc │ │ │ │ ├── uhc.command.tsx │ │ │ │ └── uhc.profile.tsx │ │ │ ├── unverify.command.ts │ │ │ ├── vampirez │ │ │ │ ├── vampirez.command.tsx │ │ │ │ └── vampirez.profile.tsx │ │ │ ├── verify.command.ts │ │ │ ├── walls │ │ │ │ ├── walls.command.tsx │ │ │ │ └── walls.profile.tsx │ │ │ ├── warlords │ │ │ │ ├── tables │ │ │ │ │ ├── capture-the-flag.table.tsx │ │ │ │ │ ├── classes.table.tsx │ │ │ │ │ ├── deathmatch.table.tsx │ │ │ │ │ ├── domination.table.tsx │ │ │ │ │ ├── index.ts │ │ │ │ │ └── overall.table.tsx │ │ │ │ ├── warlords.command.tsx │ │ │ │ └── warlords.profile.tsx │ │ │ ├── watchdog.command.ts │ │ │ └── woolgames │ │ │ │ ├── capture-the-wool.table.tsx │ │ │ │ ├── sheepwars.table.tsx │ │ │ │ ├── woolgames.command.tsx │ │ │ │ ├── woolgames.profile.tsx │ │ │ │ └── woolwars.table.tsx │ │ ├── components │ │ │ ├── Background.tsx │ │ │ ├── Container.tsx │ │ │ ├── Footer.tsx │ │ │ ├── GameList.tsx │ │ │ ├── Header │ │ │ │ ├── Header.tsx │ │ │ │ ├── HeaderBody.tsx │ │ │ │ ├── HeaderNametag.tsx │ │ │ │ ├── index.tsx │ │ │ │ └── progression.ts │ │ │ ├── Historical │ │ │ │ ├── Exclude.tsx │ │ │ │ ├── Header.tsx │ │ │ │ ├── Include.tsx │ │ │ │ ├── Progression.tsx │ │ │ │ └── index.ts │ │ │ ├── If.tsx │ │ │ ├── List.tsx │ │ │ ├── Multiline.tsx │ │ │ ├── ProgressBar.tsx │ │ │ ├── Sidebar.tsx │ │ │ ├── Skin.tsx │ │ │ ├── Table │ │ │ │ ├── Table.tsx │ │ │ │ ├── TableData.tsx │ │ │ │ ├── TableRow.tsx │ │ │ │ ├── TableSeparator.tsx │ │ │ │ └── index.ts │ │ │ └── index.ts │ │ ├── constants.ts │ │ ├── index.ts │ │ ├── lib │ │ │ ├── command.listener.ts │ │ │ ├── convert-color-codes.ts │ │ │ ├── format-position.ts │ │ │ └── minecraft-head.ts │ │ ├── services │ │ │ ├── font-loader.service.ts │ │ │ └── index.ts │ │ ├── themes │ │ │ ├── boxes │ │ │ │ ├── hd.box.ts │ │ │ │ ├── index.ts │ │ │ │ └── uhd.box.ts │ │ │ ├── index.ts │ │ │ ├── palette.ts │ │ │ └── renderer.ts │ │ └── tips.ts │ ├── tsconfig.json │ └── words.json ├── scripts │ ├── eslint.config.js │ ├── package.json │ ├── src │ │ ├── api-key.js │ │ ├── delete-sessions.js │ │ ├── limit-redis.js │ │ ├── purge.js │ │ ├── rank-emojis.js │ │ ├── timestamp.js │ │ ├── utils.js │ │ └── validate-commands.js │ └── tsconfig.json ├── site │ ├── components │ │ ├── About │ │ │ ├── about.module.scss │ │ │ └── index.tsx │ │ ├── Button │ │ │ ├── button.module.scss │ │ │ └── index.tsx │ │ ├── Code │ │ │ ├── code.module.scss │ │ │ └── index.tsx │ │ ├── Container │ │ │ ├── container.module.scss │ │ │ └── index.tsx │ │ ├── Divider │ │ │ ├── divider.module.scss │ │ │ └── index.tsx │ │ ├── Feature │ │ │ ├── feature.module.scss │ │ │ └── index.tsx │ │ ├── Footer │ │ │ ├── footer.module.scss │ │ │ └── index.tsx │ │ ├── Hero │ │ │ ├── Navbar.tsx │ │ │ ├── hero.module.scss │ │ │ ├── index.tsx │ │ │ └── navbar.module.scss │ │ ├── Invite │ │ │ ├── index.tsx │ │ │ └── invite.module.scss │ │ ├── Layout.tsx │ │ └── StatCircle │ │ │ ├── StatCircleContainer.tsx │ │ │ ├── index.tsx │ │ │ ├── stat-circle-container.module.scss │ │ │ └── stat-circle.module.scss │ ├── globals.scss │ ├── next-env.d.ts │ ├── next.config.js │ ├── package.json │ ├── pages │ │ ├── 404.tsx │ │ ├── _app.tsx │ │ ├── _document.tsx │ │ └── index.tsx │ ├── public │ │ ├── banner.svg │ │ ├── commands.svg │ │ ├── discord.svg │ │ ├── embed-banner.png │ │ ├── examples │ │ │ ├── arcade.png │ │ │ ├── bedwars-leaderboard.png │ │ │ ├── bedwars.png │ │ │ ├── blitzsg-leaderboard.png │ │ │ ├── buildbattle-leaderboard.png │ │ │ ├── duels.png │ │ │ ├── guild-member.png │ │ │ ├── guild-overall-gexp.png │ │ │ ├── guild-overall.png │ │ │ ├── guild-top.png │ │ │ ├── recentgames.png │ │ │ ├── session-murdermystery.png │ │ │ ├── session-tntgames.png │ │ │ ├── skin.png │ │ │ ├── skywars.png │ │ │ └── woolwars-leaderboard.png │ │ ├── fonts │ │ │ └── LexendDeca.ttf │ │ ├── hero.png │ │ ├── images │ │ │ ├── apple-touch-icon.png │ │ │ ├── favicon-16x16.png │ │ │ ├── favicon-32x32.png │ │ │ └── favicon.ico │ │ ├── invite.svg │ │ ├── logo.svg │ │ ├── robots.txt │ │ ├── servers.svg │ │ └── socials │ │ │ ├── discord.svg │ │ │ ├── github.svg │ │ │ ├── patreon.svg │ │ │ └── twitter.svg │ └── tsconfig.json ├── support-bot │ ├── .swcrc │ ├── eslint.config.js │ ├── package.json │ ├── src │ │ ├── commands │ │ │ ├── close.command.ts │ │ │ ├── commands.command.ts │ │ │ ├── delete-player.command.ts │ │ │ ├── force-unverify.command.ts │ │ │ ├── force-verify.command.ts │ │ │ ├── tags.command.ts │ │ │ ├── ticket-menu.command.ts │ │ │ └── user.command.ts │ │ ├── events │ │ │ ├── guild-member-add.event.tsx │ │ │ ├── guild-member-remove.event.ts │ │ │ ├── guild-member-update.event.ts │ │ │ └── message-create.event.ts │ │ ├── index.ts │ │ ├── lib │ │ │ ├── command.listener.ts │ │ │ ├── index.ts │ │ │ └── welcomer.profile.tsx │ │ └── services │ │ │ ├── font-loader.service.ts │ │ │ ├── index.ts │ │ │ ├── mongo-loader.service.ts │ │ │ ├── tag.service.ts │ │ │ ├── ticket.service.ts │ │ │ └── user.service.ts │ └── tsconfig.json └── verify-server │ ├── eslint.config.js │ ├── package.json │ ├── src │ ├── generate-code.ts │ └── index.ts │ └── tsconfig.json ├── config.schema.js ├── crowdin.yml ├── eslint.config.js ├── locales ├── bg │ └── default.json ├── cs │ └── default.json ├── da │ └── default.json ├── de │ └── default.json ├── el │ └── default.json ├── en-US │ ├── default.json │ └── emojis.json ├── es-ES │ └── default.json ├── fi │ └── default.json ├── fr │ └── default.json ├── hi │ └── default.json ├── hr │ └── default.json ├── hu │ └── default.json ├── it │ └── default.json ├── ja │ └── default.json ├── ko │ └── default.json ├── lt │ └── default.json ├── nl │ └── default.json ├── no │ └── default.json ├── pl │ └── default.json ├── pt-BR │ └── default.json ├── ro │ └── default.json ├── ru │ └── default.json ├── sv-SE │ └── default.json ├── th │ └── default.json ├── tr │ └── default.json ├── uk │ └── default.json ├── vi │ └── default.json ├── zh-CN │ └── default.json └── zh-TW │ └── default.json ├── package.json ├── packages ├── api-client │ ├── eslint.config.js │ ├── package.json │ ├── src │ │ ├── api.service.ts │ │ ├── constants.ts │ │ ├── exceptions │ │ │ ├── base.404.ts │ │ │ ├── guild.404.ts │ │ │ ├── index.ts │ │ │ ├── player.404.ts │ │ │ ├── session.404.ts │ │ │ ├── skin.404.ts │ │ │ └── status.404.ts │ │ ├── index.ts │ │ └── responses │ │ │ ├── delete.player.response.ts │ │ │ ├── error.response.ts │ │ │ ├── get.command-usage.response.ts │ │ │ ├── get.gamecounts.response.ts │ │ │ ├── get.guild.response.ts │ │ │ ├── get.key.response.ts │ │ │ ├── get.player-search.response.ts │ │ │ ├── get.player.response.ts │ │ │ ├── get.session.response.ts │ │ │ ├── get.skin-textures.response.ts │ │ │ ├── get.status.response.ts │ │ │ ├── get.user.response.ts │ │ │ ├── get.watchdog.response.ts │ │ │ ├── index.ts │ │ │ ├── post.leaderboard.response.ts │ │ │ ├── post.rankings.response.ts │ │ │ ├── put.user-badge.response.ts │ │ │ └── success.response.ts │ └── tsconfig.json ├── assets │ ├── eslint.config.js │ ├── package.json │ ├── src │ │ └── index.ts │ └── tsconfig.json ├── discord │ ├── eslint.config.js │ ├── package.json │ ├── src │ │ ├── arguments │ │ │ ├── abstract.argument.ts │ │ │ ├── choice.argument.ts │ │ │ ├── file.argument.ts │ │ │ ├── guild.argument.ts │ │ │ ├── index.ts │ │ │ ├── mojang-player.argument.ts │ │ │ ├── number.argument.ts │ │ │ ├── player.argument.ts │ │ │ ├── text.argument.ts │ │ │ └── user.argument.ts │ │ ├── command │ │ │ ├── abstract-command.listener.ts │ │ │ ├── command.builder.ts │ │ │ ├── command.context.ts │ │ │ ├── command.decorator.ts │ │ │ ├── command.interface.ts │ │ │ ├── command.loader.ts │ │ │ ├── command.poster.ts │ │ │ ├── command.resolvable.ts │ │ │ ├── index.ts │ │ │ └── subcommand.decorator.ts │ │ ├── event │ │ │ ├── abstract-event.listener.ts │ │ │ ├── event.loader.ts │ │ │ └── index.ts │ │ ├── index.ts │ │ ├── interaction │ │ │ ├── index.ts │ │ │ ├── interaction.content.ts │ │ │ └── interaction.ts │ │ ├── messages │ │ │ ├── base.message.ts │ │ │ ├── components │ │ │ │ ├── action-row.builder.ts │ │ │ │ ├── button.builder.ts │ │ │ │ ├── index.ts │ │ │ │ ├── modal.builder.ts │ │ │ │ ├── parse-emoji.ts │ │ │ │ ├── select-menu.builder.ts │ │ │ │ └── text-input.builder.ts │ │ │ ├── embed.ts │ │ │ ├── index.ts │ │ │ └── localize.ts │ │ ├── services │ │ │ ├── api.service.ts │ │ │ ├── channel.service.ts │ │ │ ├── guild.service.ts │ │ │ ├── i18n-loader.service.ts │ │ │ ├── index.ts │ │ │ ├── member.service.ts │ │ │ ├── message.service.ts │ │ │ └── paginate.service.ts │ │ └── util │ │ │ ├── error.message.ts │ │ │ └── parse-discord-error.ts │ ├── tsconfig.json │ └── vitest.config.ts ├── logger │ ├── eslint.config.js │ ├── package.json │ ├── src │ │ └── index.ts │ ├── tsconfig.json │ └── vitest.config.ts ├── math │ ├── eslint.config.js │ ├── package.json │ ├── src │ │ └── index.ts │ ├── tsconfig.json │ └── vitest.config.ts ├── rendering │ ├── .swcrc │ ├── eslint.config.js │ ├── package.json │ ├── positions.json │ ├── sizes.json │ ├── src │ │ ├── colors │ │ │ └── index.ts │ │ ├── font │ │ │ ├── font-renderer.ts │ │ │ ├── index.ts │ │ │ └── tokens.ts │ │ ├── hooks │ │ │ ├── index.ts │ │ │ ├── loadImage.ts │ │ │ ├── useChildren.ts │ │ │ ├── useComponentSize.ts │ │ │ └── useGradient.ts │ │ ├── index.ts │ │ ├── intrinsics │ │ │ ├── Box.ts │ │ │ ├── Div.ts │ │ │ ├── Image.ts │ │ │ ├── Text.ts │ │ │ └── index.ts │ │ ├── jsx-runtime │ │ │ ├── convert.ts │ │ │ └── index.ts │ │ └── jsx │ │ │ ├── create-instructions.ts │ │ │ ├── index.ts │ │ │ ├── instrinsics.ts │ │ │ ├── render.ts │ │ │ ├── types.ts │ │ │ └── util.ts │ ├── tests │ │ └── index.spec.tsx │ ├── tsconfig.json │ └── vitest.config.ts ├── schemas │ ├── eslint.config.js │ ├── package.json │ ├── src │ │ ├── color.ts │ │ ├── commands │ │ │ └── index.ts │ │ ├── game │ │ │ ├── game-modes.ts │ │ │ ├── game.ts │ │ │ └── index.ts │ │ ├── gamecounts │ │ │ └── index.ts │ │ ├── guild │ │ │ ├── achievements.ts │ │ │ ├── exp-by-game.ts │ │ │ ├── index.ts │ │ │ ├── member.ts │ │ │ ├── rank.ts │ │ │ └── util.ts │ │ ├── index.ts │ │ ├── key │ │ │ └── index.ts │ │ ├── metadata │ │ │ ├── constants.ts │ │ │ ├── deserialize.ts │ │ │ ├── field.options.ts │ │ │ ├── field │ │ │ │ ├── get-leaderboard-metadata.ts │ │ │ │ ├── get-store-metadata.ts │ │ │ │ ├── get-type-metadata.ts │ │ │ │ └── index.ts │ │ │ ├── index.ts │ │ │ ├── metadata-scanner.ts │ │ │ ├── metadata.interface.ts │ │ │ └── serialize.ts │ │ ├── player │ │ │ ├── gamemodes │ │ │ │ ├── arcade │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── mode.ts │ │ │ │ │ └── seasonal-mode.ts │ │ │ │ ├── arenabrawl │ │ │ │ │ ├── index.ts │ │ │ │ │ └── mode.ts │ │ │ │ ├── bedwars │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── mode.ts │ │ │ │ │ ├── slumber.ts │ │ │ │ │ └── util.ts │ │ │ │ ├── blitzsg │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── kit.ts │ │ │ │ │ └── mode.ts │ │ │ │ ├── buildbattle │ │ │ │ │ ├── index.ts │ │ │ │ │ └── mode.ts │ │ │ │ ├── challenges │ │ │ │ │ ├── game-challenges.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── modes │ │ │ │ │ │ ├── arcade.ts │ │ │ │ │ │ ├── arenabrawl.ts │ │ │ │ │ │ ├── bedwars.ts │ │ │ │ │ │ ├── blitzsg.ts │ │ │ │ │ │ ├── buildbattle.ts │ │ │ │ │ │ ├── cops-and-crims.ts │ │ │ │ │ │ ├── duels.ts │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ ├── megawalls.ts │ │ │ │ │ │ ├── murdermystery.ts │ │ │ │ │ │ ├── paintball.ts │ │ │ │ │ │ ├── quake.ts │ │ │ │ │ │ ├── skywars.ts │ │ │ │ │ │ ├── smashheroes.ts │ │ │ │ │ │ ├── speeduhc.ts │ │ │ │ │ │ ├── tntgames.ts │ │ │ │ │ │ ├── turbokartracers.ts │ │ │ │ │ │ ├── uhc.ts │ │ │ │ │ │ ├── vampirez.ts │ │ │ │ │ │ ├── walls.ts │ │ │ │ │ │ ├── warlords.ts │ │ │ │ │ │ └── woolgames.ts │ │ │ │ │ └── util.ts │ │ │ │ ├── copsandcrims │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── mode.ts │ │ │ │ │ └── util.ts │ │ │ │ ├── duels │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── mode.ts │ │ │ │ │ └── util.ts │ │ │ │ ├── general │ │ │ │ │ ├── bingo.ts │ │ │ │ │ ├── events.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ └── util.ts │ │ │ │ ├── index.ts │ │ │ │ ├── megawalls │ │ │ │ │ ├── index.ts │ │ │ │ │ └── kit.ts │ │ │ │ ├── murdermystery │ │ │ │ │ ├── index.ts │ │ │ │ │ └── mode.ts │ │ │ │ ├── paintball │ │ │ │ │ ├── index.ts │ │ │ │ │ └── perks.ts │ │ │ │ ├── parkour │ │ │ │ │ └── index.ts │ │ │ │ ├── pit │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── renown-upgrades.json │ │ │ │ │ └── util.ts │ │ │ │ ├── prefixes.ts │ │ │ │ ├── quake │ │ │ │ │ ├── index.ts │ │ │ │ │ └── mode.ts │ │ │ │ ├── quests │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── modes │ │ │ │ │ │ ├── arcade.ts │ │ │ │ │ │ ├── arenabrawl.ts │ │ │ │ │ │ ├── bedwars.ts │ │ │ │ │ │ ├── blitzsg.ts │ │ │ │ │ │ ├── buildbattle.ts │ │ │ │ │ │ ├── cops-and-crims.ts │ │ │ │ │ │ ├── duels.ts │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ ├── megawalls.ts │ │ │ │ │ │ ├── murdermystery.ts │ │ │ │ │ │ ├── paintball.ts │ │ │ │ │ │ ├── pit.ts │ │ │ │ │ │ ├── quake.ts │ │ │ │ │ │ ├── skywars.ts │ │ │ │ │ │ ├── smashheroes.ts │ │ │ │ │ │ ├── speeduhc.ts │ │ │ │ │ │ ├── tntgames.ts │ │ │ │ │ │ ├── turbokartracers.ts │ │ │ │ │ │ ├── uhc.ts │ │ │ │ │ │ ├── vampirez.ts │ │ │ │ │ │ ├── walls.ts │ │ │ │ │ │ ├── warlords.ts │ │ │ │ │ │ └── woolgames.ts │ │ │ │ │ └── util.ts │ │ │ │ ├── skywars │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── mode.ts │ │ │ │ │ └── util.ts │ │ │ │ ├── smashheroes │ │ │ │ │ ├── index.ts │ │ │ │ │ └── mode.ts │ │ │ │ ├── speeduhc │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── mastery.ts │ │ │ │ │ ├── mode.ts │ │ │ │ │ └── util.ts │ │ │ │ ├── tntgames │ │ │ │ │ ├── index.ts │ │ │ │ │ └── mode.ts │ │ │ │ ├── turbokartracers │ │ │ │ │ └── index.ts │ │ │ │ ├── uhc │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── mode.ts │ │ │ │ │ └── util.ts │ │ │ │ ├── vampirez │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── life.ts │ │ │ │ │ └── prefixes.ts │ │ │ │ ├── walls │ │ │ │ │ └── index.ts │ │ │ │ ├── warlords │ │ │ │ │ ├── class.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ └── mode.ts │ │ │ │ └── woolgames │ │ │ │ │ ├── capture-the-wool.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── sheepwars.ts │ │ │ │ │ ├── util.ts │ │ │ │ │ └── woolwars.ts │ │ │ ├── index.ts │ │ │ ├── socials.ts │ │ │ ├── stats.ts │ │ │ ├── status.ts │ │ │ └── util.ts │ │ ├── progression.ts │ │ ├── ratios.ts │ │ ├── skin │ │ │ └── index.ts │ │ ├── status │ │ │ ├── index.ts │ │ │ └── recent-game.ts │ │ ├── tags │ │ │ └── index.ts │ │ ├── ticket │ │ │ └── index.ts │ │ ├── user │ │ │ ├── footer.ts │ │ │ ├── index.ts │ │ │ └── theme.ts │ │ ├── util │ │ │ ├── create-historical-player.ts │ │ │ ├── historical-scanner.ts │ │ │ ├── index.ts │ │ │ ├── leaderboard-scanner.ts │ │ │ └── parse-fields.ts │ │ ├── verify-codes │ │ │ └── index.ts │ │ └── watchdog │ │ │ ├── index.ts │ │ │ └── mode.ts │ ├── tsconfig.json │ └── vitest.config.ts ├── skin-renderer │ ├── Cargo.toml │ ├── build.rs │ ├── examples │ │ ├── node.ts │ │ └── wasm.ts │ ├── index.cjs │ ├── index.d.ts │ ├── models │ │ ├── alex.png │ │ └── steve.png │ ├── package.json │ └── src │ │ ├── buffer_dimensions.rs │ │ ├── camera │ │ ├── mod.rs │ │ ├── orbital.rs │ │ └── uniform.rs │ │ ├── error.rs │ │ ├── geometry │ │ ├── box_geometry.rs │ │ ├── coordinate.rs │ │ ├── mod.rs │ │ ├── orientation.rs │ │ ├── outer_layer_geometry.rs │ │ ├── prism.rs │ │ └── vertex.rs │ │ ├── instance.rs │ │ ├── lib.rs │ │ ├── light │ │ └── mod.rs │ │ ├── material │ │ └── mod.rs │ │ ├── mesh.rs │ │ ├── model.rs │ │ ├── native.rs │ │ ├── renderer │ │ ├── backend.rs │ │ ├── mod.rs │ │ ├── native.rs │ │ ├── shader.wgsl │ │ └── wasm.rs │ │ ├── skin_loader.rs │ │ ├── texture.rs │ │ └── wasm.rs └── util │ ├── eslint.config.js │ ├── package.json │ ├── src │ ├── config.ts │ ├── flatten.ts │ ├── index.ts │ ├── minecraft-colors.ts │ ├── types.ts │ ├── unflatten.ts │ └── util.ts │ ├── tsconfig.json │ └── vitest.config.ts ├── pm2.config.cjs ├── pnpm-lock.yaml ├── pnpm-workspace.yaml ├── renovate.json ├── rustfmt.toml ├── tsconfig.base.json ├── turbo.json ├── vite.swc.ts ├── vitest.shared.ts └── vitest.workspace.ts /.devcontainer/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/vscode/devcontainers/typescript-node:1-16 2 | 3 | # Install additional OS packages 4 | RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ 5 | && apt-get -y install --no-install-recommends fontconfig redis-server 6 | 7 | # Install NPM packages 8 | RUN su node -c "npm install -g pm2 git-cz pnpm" -------------------------------------------------------------------------------- /.devcontainer/devcontainer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Statsify", 3 | "build": { 4 | "dockerfile": "Dockerfile" 5 | }, 6 | "customizations": { 7 | "vscode": { 8 | "extensions": [ 9 | "dbaeumer.vscode-eslint", 10 | "esbenp.prettier-vscode", 11 | "vivaxy.vscode-conventional-commits", 12 | "mikestead.dotenv", 13 | "ms-azuretools.vscode-docker", 14 | "lokalise.i18n-ally", 15 | "gruntfuggly.todo-tree" 16 | ] 17 | } 18 | }, 19 | "runArgs": [ 20 | "--privileged" 21 | ], 22 | "containerEnv": { 23 | "USE_POLLING": "true" 24 | }, 25 | "remoteUser": "node", 26 | "postCreateCommand": "git submodule update --init && pnpm install && pnpm run build", 27 | "postStartCommand": "sudo /etc/init.d/redis-server start && git config core.autocrlf true && pnpm scripts api-key --nonInteractiveKeyCreation", 28 | "features": { 29 | "ghcr.io/devcontainers/features/git:1": {}, 30 | "ghcr.io/devcontainers/features/github-cli:1": {} 31 | } 32 | } -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | contact_links: 3 | - name: Discord server 4 | url: https://statsify.net/discord 5 | about: Visit our discord server for general questions and support. -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Description: 2 | Related issues (if exists): -------------------------------------------------------------------------------- /.github/workflows/deploy.yml: -------------------------------------------------------------------------------- 1 | name: Deploy 2 | on: 3 | push: 4 | tags: 5 | - "v*" 6 | workflow_dispatch: 7 | 8 | permissions: 9 | checks: write 10 | contents: write 11 | 12 | jobs: 13 | deploy: 14 | name: Deploy 15 | runs-on: core 16 | environment: production 17 | steps: 18 | - name: Checkout repository 19 | uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 20 | with: 21 | token: ${{ secrets.REPO_PAT }} 22 | submodules: recursive 23 | 24 | - name: Install dependencies 25 | run: pnpm install --force 26 | 27 | - name: Build Code 28 | run: pnpm scripts purge --dist && pnpm build --force 29 | 30 | - name: Prepare Assets 31 | run: cd assets/private && pnpm blur && cd ../../ 32 | 33 | - name: Move Config 34 | run: cp /home/config.js ./config.js 35 | 36 | - name: Restart PM2 37 | run: npx pm2 restart pm2.config.cjs 38 | -------------------------------------------------------------------------------- /.github/workflows/issue_labeler.yml: -------------------------------------------------------------------------------- 1 | name: "Issue Labeler" 2 | on: 3 | issues: 4 | types: [opened] 5 | 6 | jobs: 7 | labeler: 8 | runs-on: ubuntu-latest 9 | steps: 10 | - uses: github/issue-labeler@98b5412841f6c4b0b3d9c29d53c13fad16bd7de2 # v3.2 11 | with: 12 | repo-token: "${{ secrets.GITHUB_TOKEN }}" 13 | configuration-path: .github/issue_labeler.yml 14 | enable-versioned-regex: 0 15 | -------------------------------------------------------------------------------- /.github/workflows/pr_labeler.yml: -------------------------------------------------------------------------------- 1 | name: "PR Labeler" 2 | on: 3 | - pull_request_target 4 | 5 | jobs: 6 | labeler: 7 | permissions: 8 | contents: read 9 | pull-requests: write 10 | runs-on: ubuntu-latest 11 | steps: 12 | - uses: actions/labeler@8558fd74291d67161a8a78ce36a881fa63b766a9 # v5 13 | with: 14 | repo-token: "${{ secrets.GITHUB_TOKEN }}" 15 | configuration-path: .github/pr_labeler.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | config.js 2 | config.json 3 | dist 4 | node_modules 5 | .turbo 6 | package-lock.json 7 | out 8 | .yarn/install-state.gz 9 | .yarn/build-state.yml 10 | *.tsbuildinfo 11 | *.zip 12 | *.tar 13 | *.tar.xz 14 | *.tar.gz 15 | *.7z 16 | *.rar 17 | .swc 18 | .next 19 | . 20 | coverage 21 | apps/discord-bot/commands.json 22 | apps/support-bot/commands.json 23 | .pnpm-store/ 24 | Cargo.lock 25 | /target 26 | *.node 27 | .env -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "assets/public"] 2 | path = assets/public 3 | url = https://github.com/Statsify/public-assets 4 | [submodule "assets/private"] 5 | path = assets/private 6 | url = https://github.com/Statsify/assets -------------------------------------------------------------------------------- /.nvmrc: -------------------------------------------------------------------------------- 1 | 22.6.0 2 | -------------------------------------------------------------------------------- /.swcrc: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://swc.rs/schema.json", 3 | "jsc": { 4 | "parser": { 5 | "syntax": "typescript", 6 | "decorators": true, 7 | "dynamicImport": true 8 | }, 9 | "transform": { 10 | "legacyDecorator": true, 11 | "decoratorMetadata": true, 12 | "optimizer": { 13 | "simplify": true, 14 | "globals": { 15 | "vars": { 16 | "import.meta.vitest": "false" 17 | } 18 | }, 19 | "jsonify": { 20 | "minCost": 2048 21 | } 22 | } 23 | }, 24 | "target": "es2022", 25 | "keepClassNames": true, 26 | "loose": false, 27 | "externalHelpers": true, 28 | "preserveAllComments": false, 29 | "experimental": { 30 | "keepImportAttributes": true 31 | } 32 | }, 33 | "module": { 34 | "type": "es6", 35 | "strict": true, 36 | "strictMode": true, 37 | "lazy": false, 38 | "noInterop": false 39 | }, 40 | "sourceMaps": true 41 | } -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [workspace] 2 | members = ["packages/skin-renderer"] 3 | resolver = "2" 4 | 5 | [profile.release] 6 | lto = true 7 | -------------------------------------------------------------------------------- /apps/api/eslint.config.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | export { default } from "../../eslint.config.js"; 10 | -------------------------------------------------------------------------------- /apps/api/src/auth/auth.module.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import { AuthController } from "./auth.controller.js"; 10 | import { AuthGuard } from "./auth.guard.js"; 11 | import { AuthService } from "./auth.service.js"; 12 | import { Global, Module } from "@nestjs/common"; 13 | 14 | @Global() 15 | @Module({ 16 | providers: [AuthGuard, AuthService], 17 | controllers: [AuthController], 18 | exports: [AuthService], 19 | }) 20 | export class AuthModule {} 21 | -------------------------------------------------------------------------------- /apps/api/src/auth/auth.role.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | export enum AuthRole { 10 | MEMBER = 0, 11 | WORKER = 300, 12 | ADMIN = 999 13 | } 14 | -------------------------------------------------------------------------------- /apps/api/src/auth/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | export * from "./auth.decorator.js"; 10 | export * from "./auth.module.js"; 11 | export * from "./auth.role.js"; 12 | -------------------------------------------------------------------------------- /apps/api/src/commands/commands.module.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import { Commands } from "@statsify/schemas"; 10 | import { CommandsController } from "./commands.controller.js"; 11 | import { CommandsService } from "./commands.service.js"; 12 | import { Module } from "@nestjs/common"; 13 | import { TypegooseModule } from "@m8a/nestjs-typegoose"; 14 | 15 | @Module({ 16 | imports: [TypegooseModule.forFeature([Commands])], 17 | controllers: [CommandsController], 18 | providers: [CommandsService], 19 | }) 20 | export class CommandsModule {} 21 | -------------------------------------------------------------------------------- /apps/api/src/commands/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | export * from "./commands.module.js"; 10 | -------------------------------------------------------------------------------- /apps/api/src/dtos/cache.dto.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import { ApiProperty } from "@nestjs/swagger"; 10 | import { CacheLevel } from "@statsify/api-client"; 11 | import { IsEnum, IsOptional } from "class-validator"; 12 | 13 | export class CacheDto { 14 | @ApiProperty({ 15 | enum: CacheLevel, 16 | enumName: "CacheLevel", 17 | example: CacheLevel.CACHE, 18 | default: CacheLevel.CACHE, 19 | description: "Describes whether to return live data or cached data.", 20 | required: false, 21 | }) 22 | @IsOptional() 23 | @IsEnum(CacheLevel) 24 | public cache: CacheLevel = CacheLevel.CACHE; 25 | } 26 | -------------------------------------------------------------------------------- /apps/api/src/dtos/cached-player.dto.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import { CacheDto } from "./cache.dto.js"; 10 | import { IntersectionType } from "@nestjs/swagger"; 11 | import { PlayerDto } from "./player.dto.js"; 12 | 13 | export class CachedPlayerDto extends IntersectionType(PlayerDto, CacheDto) {} 14 | -------------------------------------------------------------------------------- /apps/api/src/dtos/command.dto.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import { ApiProperty } from "@nestjs/swagger"; 10 | import { IsString } from "class-validator"; 11 | 12 | export class CommandDto { 13 | @IsString() 14 | @ApiProperty() 15 | public command: string; 16 | } 17 | -------------------------------------------------------------------------------- /apps/api/src/dtos/guild-rankings.dto.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import { ApiProperty } from "@nestjs/swagger"; 10 | import { Guild, LeaderboardScanner } from "@statsify/schemas"; 11 | import { IsEnum, IsString, MaxLength, MinLength } from "class-validator"; 12 | 13 | const fields = LeaderboardScanner.getLeaderboardFields(Guild).map(([key]) => key); 14 | 15 | export class GuildRankingDto { 16 | @ApiProperty({ enum: fields, type: [String] }) 17 | @IsEnum(fields, { each: true }) 18 | public fields: string[]; 19 | 20 | @IsString() 21 | @MinLength(24) 22 | @MaxLength(24) 23 | @ApiProperty() 24 | public id: string; 25 | } 26 | -------------------------------------------------------------------------------- /apps/api/src/dtos/head.dto.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import { ApiProperty } from "@nestjs/swagger"; 10 | import { IsInt, IsOptional, Max, Min } from "class-validator"; 11 | import { Transform } from "class-transformer"; 12 | import { UuidDto } from "./uuid.dto.js"; 13 | 14 | export class HeadDto extends UuidDto { 15 | @IsOptional() 16 | @Transform(({ value }) => +value) 17 | @IsInt() 18 | @Min(8) 19 | @Max(800) 20 | @ApiProperty({ 21 | description: "The size of the head", 22 | default: 160, 23 | minimum: 8, 24 | maximum: 800, 25 | }) 26 | public size = 160; 27 | } 28 | -------------------------------------------------------------------------------- /apps/api/src/dtos/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | export * from "./cache.dto.js"; 10 | export * from "./cached-player.dto.js"; 11 | export * from "./guild-leaderboard.dto.js"; 12 | export * from "./guild-rankings.dto.js"; 13 | export * from "./guild.dto.js"; 14 | export * from "./head.dto.js"; 15 | export * from "./user.dto.js"; 16 | export * from "./verify-code.dto.js"; 17 | export * from "./command.dto.js"; 18 | export * from "./update-player.dto.js"; 19 | export * from "./player-group.dto.js"; 20 | export * from "./player-search.dto.js"; 21 | export * from "./player.dto.js"; 22 | export * from "./key.dto.js"; 23 | export * from "./uuid.dto.js"; 24 | export * from "./player-rankings.dto.js"; 25 | export * from "./player-leaderboard.dto.js"; 26 | export * from "./session.dto.js"; 27 | -------------------------------------------------------------------------------- /apps/api/src/dtos/key.dto.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import { ApiProperty } from "@nestjs/swagger"; 10 | import { IsString } from "class-validator"; 11 | 12 | export class AddKeyDto { 13 | @IsString() 14 | @ApiProperty() 15 | public name: string; 16 | } 17 | 18 | export class KeyParamDto { 19 | @IsString() 20 | @ApiProperty() 21 | public key: string; 22 | } 23 | 24 | export class KeyHeaderDto { 25 | @IsString() 26 | @ApiProperty() 27 | public "x-api-key": string; 28 | } 29 | -------------------------------------------------------------------------------- /apps/api/src/dtos/player-group.dto.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import { ApiProperty } from "@nestjs/swagger"; 10 | import { IsNumber, Min } from "class-validator"; 11 | import { Transform } from "class-transformer"; 12 | 13 | export class PlayerGroupDto { 14 | @Transform((params) => +params.value) 15 | @IsNumber() 16 | @Min(0) 17 | @ApiProperty() 18 | public start: number; 19 | 20 | @Transform((params) => +params.value) 21 | @IsNumber() 22 | @ApiProperty() 23 | public end: number; 24 | } 25 | -------------------------------------------------------------------------------- /apps/api/src/dtos/player-rankings.dto.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import { ApiProperty } from "@nestjs/swagger"; 10 | import { IsEnum } from "class-validator"; 11 | import { LeaderboardScanner, Player } from "@statsify/schemas"; 12 | import { UuidDto } from "./uuid.dto.js"; 13 | 14 | const fields = LeaderboardScanner.getLeaderboardFields(Player).map(([key]) => key); 15 | 16 | export class PlayerRankingsDto extends UuidDto { 17 | @ApiProperty({ enum: fields, type: [String] }) 18 | @IsEnum(fields, { each: true }) 19 | public fields: string[]; 20 | } 21 | -------------------------------------------------------------------------------- /apps/api/src/dtos/player-search.dto.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import { ApiProperty } from "@nestjs/swagger"; 10 | import { IsString, MaxLength } from "class-validator"; 11 | 12 | export class PlayerSearchDto { 13 | @IsString() 14 | @MaxLength(16) 15 | @ApiProperty() 16 | public query: string; 17 | } 18 | -------------------------------------------------------------------------------- /apps/api/src/dtos/player.dto.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import { ApiProperty } from "@nestjs/swagger"; 10 | import { IsString, MaxLength, MinLength } from "class-validator"; 11 | 12 | export class PlayerDto { 13 | @IsString() 14 | @MinLength(1) 15 | @MaxLength(36) 16 | @ApiProperty({ 17 | example: "j4cobi", 18 | description: "The player's username or uuid", 19 | }) 20 | public player: string; 21 | } 22 | -------------------------------------------------------------------------------- /apps/api/src/dtos/session.dto.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import { IsOptional, IsString } from "class-validator"; 10 | import { PlayerDto } from "./player.dto.js"; 11 | 12 | export class SessionDto extends PlayerDto { 13 | @IsOptional() 14 | @IsString() 15 | public userUuid?: string; 16 | } 17 | -------------------------------------------------------------------------------- /apps/api/src/dtos/update-player.dto.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import { ApiProperty } from "@nestjs/swagger"; 10 | import { IsString } from "class-validator"; 11 | 12 | export class UpdatePlayerDto { 13 | @IsString() 14 | @ApiProperty() 15 | public uuid: string; 16 | 17 | @IsString() 18 | @ApiProperty() 19 | public playername: string; 20 | 21 | @IsString() 22 | @ApiProperty() 23 | public displayname: string; 24 | } 25 | -------------------------------------------------------------------------------- /apps/api/src/dtos/uuid.dto.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import { ApiProperty } from "@nestjs/swagger"; 10 | import { IsString, MaxLength, MinLength } from "class-validator"; 11 | 12 | export class UuidDto { 13 | @IsString() 14 | @MaxLength(36) 15 | @MinLength(32) 16 | @ApiProperty() 17 | public uuid: string; 18 | } 19 | -------------------------------------------------------------------------------- /apps/api/src/dtos/verify-code.dto.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import { ApiProperty, PartialType } from "@nestjs/swagger"; 10 | import { IsOptional, IsString, MaxLength, MinLength } from "class-validator"; 11 | import { UuidDto } from "./uuid.dto.js"; 12 | 13 | export class VerifyCodeDto extends PartialType(UuidDto) { 14 | @ApiProperty({ description: "Discord ID" }) 15 | @IsString() 16 | @MinLength(17) 17 | public id: string; 18 | 19 | @ApiProperty({ description: "Verification Code" }) 20 | @IsString() 21 | @IsOptional() 22 | @MinLength(4) 23 | @MaxLength(4) 24 | public code?: string; 25 | } 26 | -------------------------------------------------------------------------------- /apps/api/src/guild/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | export * from "./guild.controller.js"; 10 | export * from "./guild.module.js"; 11 | export * from "./guild.service.js"; 12 | -------------------------------------------------------------------------------- /apps/api/src/hypixel-resources/hypixel-resources.module.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import { HypixelModule } from "#hypixel"; 10 | import { HypixelResourcesController } from "./hypixel-resources.controller.js"; 11 | import { Module } from "@nestjs/common"; 12 | 13 | @Module({ 14 | imports: [HypixelModule], 15 | controllers: [HypixelResourcesController], 16 | }) 17 | export class HypixelResourcesModule {} 18 | -------------------------------------------------------------------------------- /apps/api/src/hypixel-resources/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | export * from "./hypixel-resources.controller.js"; 10 | export * from "./hypixel-resources.module.js"; 11 | -------------------------------------------------------------------------------- /apps/api/src/hypixel/hypixel.module.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import { HttpModule } from "@nestjs/axios"; 10 | import { HypixelService } from "./hypixel.service.js"; 11 | import { Module } from "@nestjs/common"; 12 | import { config } from "@statsify/util"; 13 | 14 | @Module({ 15 | imports: [ 16 | HttpModule.register({ 17 | baseURL: "https://api.hypixel.net/", 18 | headers: { 19 | "API-Key": config("hypixelApi.key"), 20 | "accept-encoding": "*", 21 | }, 22 | timeout: config("hypixelApi.timeout", { default: 5000 }), 23 | }), 24 | ], 25 | providers: [HypixelService], 26 | exports: [HypixelService], 27 | }) 28 | export class HypixelModule {} 29 | -------------------------------------------------------------------------------- /apps/api/src/hypixel/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | export * from "./hypixel.module.js"; 10 | export * from "./hypixel.service.js"; 11 | -------------------------------------------------------------------------------- /apps/api/src/leaderboards/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | export * from "./leaderboard.service.js"; 10 | -------------------------------------------------------------------------------- /apps/api/src/player/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | export * from "./player.controller.js"; 10 | export * from "./player.module.js"; 11 | export * from "./player.service.js"; 12 | -------------------------------------------------------------------------------- /apps/api/src/redis/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | /** 10 | * Adapted from: https://github.com/nest-modules/ioredis 11 | * because the module has not been updated for the latest version of NestJS and the repository is inactive 12 | */ 13 | 14 | export * from "./redis.module.js"; 15 | export * from "./redis.decorators.js"; 16 | export * from "./redis.interfaces.js"; 17 | export * from "./redis.utils.js"; 18 | -------------------------------------------------------------------------------- /apps/api/src/redis/redis.constants.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | export const REDIS_MODULE_CONNECTION = "default"; 10 | export const REDIS_MODULE_CONNECTION_TOKEN = "IORedisModuleConnectionToken"; 11 | export const REDIS_MODULE_OPTIONS_TOKEN = "IORedisModuleOptionsToken"; 12 | -------------------------------------------------------------------------------- /apps/api/src/redis/redis.decorators.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import { Inject } from "@nestjs/common"; 10 | import { getRedisConnectionToken } from "./redis.utils.js"; 11 | 12 | export const InjectRedis = (connection?: string) => 13 | Inject(getRedisConnectionToken(connection)); 14 | -------------------------------------------------------------------------------- /apps/api/src/redis/redis.interfaces.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import type { RedisOptions } from "ioredis"; 10 | 11 | export interface RedisModuleOptions { 12 | config: RedisOptions & { url?: string }; 13 | } 14 | -------------------------------------------------------------------------------- /apps/api/src/redis/redis.module.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import { DynamicModule, Module } from "@nestjs/common"; 10 | import { RedisCoreModule } from "./redis.core-module.js"; 11 | import type { RedisModuleOptions } from "./redis.interfaces.js"; 12 | 13 | @Module({}) 14 | export class RedisModule { 15 | public static forRoot(options: RedisModuleOptions, connection?: string): DynamicModule { 16 | return { 17 | module: RedisModule, 18 | imports: [RedisCoreModule.forRoot(options, connection)], 19 | exports: [RedisCoreModule], 20 | }; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /apps/api/src/redis/redis.utils.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import { 10 | REDIS_MODULE_CONNECTION, 11 | REDIS_MODULE_CONNECTION_TOKEN, 12 | REDIS_MODULE_OPTIONS_TOKEN, 13 | } from "./redis.constants.js"; 14 | import { Redis } from "ioredis"; 15 | import type { RedisModuleOptions } from "./redis.interfaces.js"; 16 | 17 | export function getRedisOptionsToken(connection?: string): string { 18 | return `${connection || REDIS_MODULE_CONNECTION}_${REDIS_MODULE_OPTIONS_TOKEN}`; 19 | } 20 | 21 | export function getRedisConnectionToken(connection?: string): string { 22 | return `${connection || REDIS_MODULE_CONNECTION}_${REDIS_MODULE_CONNECTION_TOKEN}`; 23 | } 24 | 25 | export function createRedisConnection(options: RedisModuleOptions) { 26 | const { config } = options; 27 | return config.url ? new Redis(config.url, config) : new Redis(config); 28 | } 29 | -------------------------------------------------------------------------------- /apps/api/src/sentry/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | export * from "./sentry.interceptor.js"; 10 | -------------------------------------------------------------------------------- /apps/api/src/session/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | export * from "./session.controller.js"; 10 | export * from "./session.module.js"; 11 | export * from "./session.service.js"; 12 | -------------------------------------------------------------------------------- /apps/api/src/session/session.model.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import { modelOptions as ModelOptions } from "@typegoose/typegoose"; 10 | import { Player } from "@statsify/schemas"; 11 | 12 | @ModelOptions({ schemaOptions: { collection: "session" } }) 13 | export class Session extends Player {} 14 | -------------------------------------------------------------------------------- /apps/api/src/session/session.module.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import { Module, forwardRef } from "@nestjs/common"; 10 | import { Player, User } from "@statsify/schemas"; 11 | import { PlayerModule } from "#player"; 12 | import { Session } from "./session.model.js"; 13 | import { SessionController } from "./session.controller.js"; 14 | import { SessionService } from "./session.service.js"; 15 | import { TypegooseModule } from "@m8a/nestjs-typegoose"; 16 | 17 | @Module({ 18 | imports: [ 19 | forwardRef(() => PlayerModule), 20 | TypegooseModule.forFeature([ 21 | Session, 22 | Player, 23 | User, 24 | ]), 25 | ], 26 | controllers: [SessionController], 27 | providers: [SessionService], 28 | }) 29 | export class SessionModule {} 30 | -------------------------------------------------------------------------------- /apps/api/src/skin/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | export * from "./skin.controller.js"; 10 | export * from "./skin.module.js"; 11 | export * from "./skin.service.js"; 12 | -------------------------------------------------------------------------------- /apps/api/src/skin/skin.module.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import { HttpModule } from "@nestjs/axios"; 10 | import { Module } from "@nestjs/common"; 11 | import { Skin } from "@statsify/schemas"; 12 | import { SkinController } from "./skin.controller.js"; 13 | import { SkinService } from "./skin.service.js"; 14 | import { TypegooseModule } from "@m8a/nestjs-typegoose"; 15 | 16 | @Module({ 17 | imports: [ 18 | TypegooseModule.forFeature([Skin]), 19 | HttpModule.register({}), 20 | ], 21 | controllers: [SkinController], 22 | providers: [SkinService], 23 | }) 24 | export class SkinModule {} 25 | -------------------------------------------------------------------------------- /apps/api/src/user/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | export * from "./user.module.js"; 10 | -------------------------------------------------------------------------------- /apps/api/src/user/user.module.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import { Module } from "@nestjs/common"; 10 | import { TypegooseModule } from "@m8a/nestjs-typegoose"; 11 | import { User, VerifyCode } from "@statsify/schemas"; 12 | import { UserController } from "./user.controller.js"; 13 | import { UserService } from "./user.service.js"; 14 | 15 | @Module({ 16 | imports: [TypegooseModule.forFeature([User, VerifyCode])], 17 | controllers: [UserController], 18 | providers: [UserService], 19 | }) 20 | export class UserModule {} 21 | -------------------------------------------------------------------------------- /apps/api/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.base.json", 3 | "include": [ 4 | "src", 5 | "eslint.config.js" 6 | ] 7 | } -------------------------------------------------------------------------------- /apps/discord-bot/eslint.config.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | export { default } from "../../eslint.config.js"; 10 | -------------------------------------------------------------------------------- /apps/discord-bot/src/commands/arcade/modes/blocking-dead.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import { BlockingDead } from "@statsify/schemas"; 10 | import { LocalizeFunction } from "@statsify/discord"; 11 | import { Table } from "#components"; 12 | 13 | interface BlockingDeadTableProps { 14 | stats: BlockingDead; 15 | t: LocalizeFunction; 16 | } 17 | 18 | export const BlockingDeadTable = ({ stats, t }: BlockingDeadTableProps) => ( 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | ); 27 | -------------------------------------------------------------------------------- /apps/discord-bot/src/commands/arcade/modes/creeper-attack.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import { CreeperAttack } from "@statsify/schemas"; 10 | import { LocalizeFunction } from "@statsify/discord"; 11 | import { Table } from "#components"; 12 | 13 | interface CreeperAttackTableProps { 14 | stats: CreeperAttack; 15 | t: LocalizeFunction; 16 | } 17 | 18 | export const CreeperAttackTable = ({ stats, t }: CreeperAttackTableProps) => ( 19 | 20 | 21 | 22 | 23 | 24 | ); 25 | -------------------------------------------------------------------------------- /apps/discord-bot/src/commands/arcade/modes/dragon-wars.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import { DragonWars } from "@statsify/schemas"; 10 | import { LocalizeFunction } from "@statsify/discord"; 11 | import { Table } from "#components"; 12 | 13 | interface DragonWarsTableProps { 14 | stats: DragonWars; 15 | t: LocalizeFunction; 16 | } 17 | 18 | export const DragonWarsTable = ({ stats, t }: DragonWarsTableProps) => ( 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | ); 27 | -------------------------------------------------------------------------------- /apps/discord-bot/src/commands/arcade/modes/index.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | export * from "./blocking-dead.js"; 10 | export * from "./bounty-hunters.js"; 11 | export * from "./creeper-attack.js"; 12 | export * from "./dragon-wars.js"; 13 | export * from "./dropper.js"; 14 | export * from "./ender-spleef.js"; 15 | export * from "./farm-hunt.js"; 16 | export * from "./football.js"; 17 | export * from "./galaxy-wars.js"; 18 | export * from "./hide-and-seek.js"; 19 | export * from "./hole-in-the-wall.js"; 20 | export * from "./hypixel-says.js"; 21 | export * from "./mini-walls.js"; 22 | export * from "./overall-arcade.js"; 23 | export * from "./party-games.js"; 24 | export * from "./pixel-painters.js"; 25 | export * from "./seasonal.js"; 26 | export * from "./throw-out.js"; 27 | export * from "./zombies.js"; 28 | export * from "./pixel-party.js"; 29 | -------------------------------------------------------------------------------- /apps/discord-bot/src/commands/arcade/modes/pixel-painters.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import { LocalizeFunction } from "@statsify/discord"; 10 | import { PixelPainters } from "@statsify/schemas"; 11 | import { Table } from "#components"; 12 | 13 | interface PixelPaintersTableProps { 14 | stats: PixelPainters; 15 | t: LocalizeFunction; 16 | } 17 | 18 | export const PixelPaintersTable = ({ stats, t }: PixelPaintersTableProps) => ( 19 | 20 | 21 | 22 | 23 | 24 | ); 25 | -------------------------------------------------------------------------------- /apps/discord-bot/src/commands/arcade/modes/throw-out.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import { LocalizeFunction } from "@statsify/discord"; 10 | import { Table } from "#components"; 11 | import { ThrowOut } from "@statsify/schemas"; 12 | 13 | interface ThrowOutTableProps { 14 | stats: ThrowOut; 15 | t: LocalizeFunction; 16 | } 17 | 18 | export const ThrowOutTable = ({ stats, t }: ThrowOutTableProps) => ( 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | ); 28 | -------------------------------------------------------------------------------- /apps/discord-bot/src/commands/arenabrawl/arenabrawl.command.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import { ARENA_BRAWL_MODES, ArenaBrawlModes } from "@statsify/schemas"; 10 | import { ArenaBrawlProfile } from "./arenabrawl.profile.js"; 11 | import { 12 | BaseHypixelCommand, 13 | BaseProfileProps, 14 | ProfileData, 15 | } from "#commands/base.hypixel-command"; 16 | import { Command } from "@statsify/discord"; 17 | 18 | @Command({ description: (t) => t("commands.arenabrawl") }) 19 | export class ArenaBrawlCommand extends BaseHypixelCommand { 20 | public constructor() { 21 | super(ARENA_BRAWL_MODES); 22 | } 23 | 24 | public getProfile( 25 | base: BaseProfileProps, 26 | { mode }: ProfileData 27 | ): JSX.Element { 28 | return ; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /apps/discord-bot/src/commands/bedwars/bedwars.command.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import { BEDWARS_MODES, BedWarsModes } from "@statsify/schemas"; 10 | import { 11 | BaseHypixelCommand, 12 | BaseProfileProps, 13 | ProfileData, 14 | } from "#commands/base.hypixel-command"; 15 | import { BedWarsProfile } from "./bedwars.profile.js"; 16 | import { Command } from "@statsify/discord"; 17 | 18 | @Command({ description: (t) => t("commands.bedwars") }) 19 | export class BedWarsCommand extends BaseHypixelCommand { 20 | public constructor() { 21 | super(BEDWARS_MODES); 22 | } 23 | 24 | public getProfile( 25 | base: BaseProfileProps, 26 | { mode }: ProfileData 27 | ): JSX.Element { 28 | return ; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /apps/discord-bot/src/commands/buildbattle/buildbattle.command.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import { BUILD_BATTLE_MODES, BuildBattleModes } from "@statsify/schemas"; 10 | import { BaseHypixelCommand, BaseProfileProps } from "#commands/base.hypixel-command"; 11 | import { BuildBattleProfile } from "./buildbattle.profile.js"; 12 | import { Command } from "@statsify/discord"; 13 | 14 | @Command({ description: (t) => t("commands.buildbattle") }) 15 | export class BuildBattleCommand extends BaseHypixelCommand { 16 | public constructor() { 17 | super(BUILD_BATTLE_MODES); 18 | } 19 | 20 | public getProfile(base: BaseProfileProps): JSX.Element { 21 | return ; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /apps/discord-bot/src/commands/deprecated/bridge.command.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import { Command, type IMessage } from "@statsify/discord"; 10 | 11 | @Command({ description: (t) => t("deprecated.command-description", { newCommandName: "/duels" }) }) 12 | export class BridgeCommand { 13 | public run(): IMessage { 14 | return { 15 | content: (t) => t("deprecated.merged-dropdown", { 16 | oldCommandName: "`/bridge`", 17 | newCommand: "", 18 | newCommandName: `${t("emojis:games.DUELS")} **Duels**`, 19 | mode: "**Bridge**", 20 | }), 21 | }; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /apps/discord-bot/src/commands/deprecated/daily.command.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import { Command } from "@statsify/discord"; 10 | import { HistoricalBase } from "./historical.base.js"; 11 | import { HistoricalTimes } from "@statsify/api-client"; 12 | 13 | @Command({ description: (t) => t("commands.daily") }) 14 | export class DailyCommand extends HistoricalBase { 15 | public constructor() { 16 | super(HistoricalTimes.DAILY); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /apps/discord-bot/src/commands/deprecated/dropper.command.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import { Command, type IMessage } from "@statsify/discord"; 10 | 11 | @Command({ description: (t) => t("deprecated.command-description", { newCommandName: "/arcade" }) }) 12 | export class DropperCommand { 13 | public run(): IMessage { 14 | return { 15 | content: (t) => t("deprecated.merged-dropdown", { 16 | oldCommandName: "`/dropper`", 17 | newCommand: "", 18 | newCommandName: `${t("emojis:games.ARCADE")} **Arcade**`, 19 | mode: "**Dropper**", 20 | }), 21 | }; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /apps/discord-bot/src/commands/deprecated/lastDay.command.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import { Command } from "@statsify/discord"; 10 | import { HistoricalBase } from "./historical.base.js"; 11 | import { HistoricalTimes } from "@statsify/api-client"; 12 | 13 | @Command({ description: (t) => t("commands.last-day") }) 14 | export class LastDayCommand extends HistoricalBase { 15 | public constructor() { 16 | super(HistoricalTimes.LAST_DAY); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /apps/discord-bot/src/commands/deprecated/lastMonth.command.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import { Command } from "@statsify/discord"; 10 | import { HistoricalBase } from "./historical.base.js"; 11 | import { HistoricalTimes } from "@statsify/api-client"; 12 | 13 | @Command({ description: (t) => t("commands.last-month") }) 14 | export class LastMonthCommand extends HistoricalBase { 15 | public constructor() { 16 | super(HistoricalTimes.LAST_MONTH); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /apps/discord-bot/src/commands/deprecated/lastWeek.command.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import { Command } from "@statsify/discord"; 10 | import { HistoricalBase } from "./historical.base.js"; 11 | import { HistoricalTimes } from "@statsify/api-client"; 12 | 13 | @Command({ description: (t) => t("commands.last-week") }) 14 | export class LastWeekCommand extends HistoricalBase { 15 | public constructor() { 16 | super(HistoricalTimes.LAST_WEEK); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /apps/discord-bot/src/commands/deprecated/monthly.command.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import { Command } from "@statsify/discord"; 10 | import { HistoricalBase } from "./historical.base.js"; 11 | import { HistoricalTimes } from "@statsify/api-client"; 12 | 13 | @Command({ description: (t) => t("commands.monthly") }) 14 | export class MonthlyCommand extends HistoricalBase { 15 | public constructor() { 16 | super(HistoricalTimes.MONTHLY); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /apps/discord-bot/src/commands/deprecated/recentgames.command.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import { Command, type IMessage } from "@statsify/discord"; 10 | 11 | @Command({ description: (t) => t("deprecated.command-description", { newCommandName: "/status" }) }) 12 | export class RecentGamesCommand { 13 | public run(): IMessage { 14 | return { 15 | content: (t) => t("deprecated.merged-direct", { 16 | oldCommandName: "`/recentgames`", 17 | newCommandName: `${t("emojis:icons.status")} **Status**`, 18 | newCommand: "", 19 | }), 20 | }; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /apps/discord-bot/src/commands/deprecated/weekly.command.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import { Command } from "@statsify/discord"; 10 | import { HistoricalBase } from "./historical.base.js"; 11 | import { HistoricalTimes } from "@statsify/api-client"; 12 | 13 | @Command({ description: (t) => t("commands.weekly") }) 14 | export class WeeklyCommand extends HistoricalBase { 15 | public constructor() { 16 | super(HistoricalTimes.WEEKLY); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /apps/discord-bot/src/commands/deprecated/yesterday.command.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import { Command } from "@statsify/discord"; 10 | import { HistoricalBase } from "./historical.base.js"; 11 | import { HistoricalTimes } from "@statsify/api-client"; 12 | 13 | @Command({ description: (t) => t("commands.last-day") }) 14 | export class YesterdayCommand extends HistoricalBase { 15 | public constructor() { 16 | super(HistoricalTimes.LAST_DAY); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /apps/discord-bot/src/commands/duels/tables/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | export * from "./bridge-duels.table.js"; 10 | export * from "./multi-duels-game-mode.table.js"; 11 | export * from "./single-duels-game-mode.table.js"; 12 | export * from "./uhc-duels.table.js"; 13 | export * from "./titles.table.js"; 14 | -------------------------------------------------------------------------------- /apps/discord-bot/src/commands/events/event-colors.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import type { EventPeriod } from "@statsify/schemas"; 10 | 11 | export const EVENT_COLORS: Record = { 12 | summer: "§e", 13 | halloween: "§5", 14 | christmas: "§c", 15 | easter: "§b", 16 | }; 17 | -------------------------------------------------------------------------------- /apps/discord-bot/src/commands/general/hypixel.command.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import { Command } from "@statsify/discord"; 10 | import { GeneralCommand } from "./general.command.js"; 11 | 12 | @Command({ description: (t) => t("commands.general") }) 13 | export class HypixelCommand extends GeneralCommand {} 14 | -------------------------------------------------------------------------------- /apps/discord-bot/src/commands/paintball/paintball.command.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import { BaseHypixelCommand, BaseProfileProps } from "#commands/base.hypixel-command"; 10 | import { Command } from "@statsify/discord"; 11 | import { PAINTBALL_MODES, PaintballModes } from "@statsify/schemas"; 12 | import { PaintballProfile } from "./paintball.profile.js"; 13 | 14 | @Command({ description: (t) => t("commands.paintball") }) 15 | export class PaintballCommand extends BaseHypixelCommand { 16 | public constructor() { 17 | super(PAINTBALL_MODES); 18 | } 19 | 20 | public getProfile(base: BaseProfileProps): JSX.Element { 21 | return ; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /apps/discord-bot/src/commands/pit/pit.command.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import { BaseHypixelCommand, BaseProfileProps } from "#commands/base.hypixel-command"; 10 | import { Command, PlayerArgument } from "@statsify/discord"; 11 | import { PIT_MODES, PitModes } from "@statsify/schemas"; 12 | import { PitProfile } from "./pit.profile.js"; 13 | 14 | @Command({ description: (t) => t("commands.pit"), args: [PlayerArgument] }) 15 | export class PitCommand extends BaseHypixelCommand { 16 | public constructor() { 17 | super(PIT_MODES); 18 | } 19 | 20 | public getProfile(base: BaseProfileProps): JSX.Element { 21 | return ; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /apps/discord-bot/src/commands/quake/quake.command.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import { 10 | BaseHypixelCommand, 11 | BaseProfileProps, 12 | ProfileData, 13 | } from "#commands/base.hypixel-command"; 14 | import { Command } from "@statsify/discord"; 15 | import { QUAKE_MODES, QuakeModes } from "@statsify/schemas"; 16 | import { QuakeProfile } from "./quake.profile.js"; 17 | 18 | @Command({ description: (t) => t("commands.quake") }) 19 | export class QuakeCommand extends BaseHypixelCommand { 20 | public constructor() { 21 | super(QUAKE_MODES); 22 | } 23 | 24 | public getProfile( 25 | base: BaseProfileProps, 26 | { mode }: ProfileData 27 | ): JSX.Element { 28 | return ; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /apps/discord-bot/src/commands/rankings/games.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import { ClassMetadata, METADATA_KEY, PlayerStats } from "@statsify/schemas"; 10 | import { removeFormatting } from "@statsify/util"; 11 | 12 | export const removeGameDash = (game: string) => game.replace(" -", ""); 13 | 14 | export const games = Object.entries( 15 | Reflect.getMetadata(METADATA_KEY, PlayerStats.prototype) as ClassMetadata 16 | ).map(([key, value]) => { 17 | const name = value.leaderboard.fieldName ?? value.leaderboard.name; 18 | 19 | return { 20 | key: key as keyof PlayerStats, 21 | name: removeGameDash(removeFormatting(name)), 22 | formatted: name, 23 | }; 24 | }); 25 | -------------------------------------------------------------------------------- /apps/discord-bot/src/commands/rankings/positions.command.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import { Command } from "@statsify/discord"; 10 | import { RankingsCommand } from "./rankings.command.js"; 11 | 12 | @Command({ description: (t) => t("commands.rankings") }) 13 | export class PositionsCommand extends RankingsCommand {} 14 | -------------------------------------------------------------------------------- /apps/discord-bot/src/commands/skywars/skywars.command.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import { 10 | BaseHypixelCommand, 11 | BaseProfileProps, 12 | ProfileData, 13 | } from "#commands/base.hypixel-command"; 14 | import { Command } from "@statsify/discord"; 15 | import { SKYWARS_MODES, SkyWarsModes } from "@statsify/schemas"; 16 | import { SkyWarsProfile } from "./skywars.profile.js"; 17 | 18 | @Command({ description: (t) => t("commands.skywars") }) 19 | export class SkyWarsCommand extends BaseHypixelCommand { 20 | public constructor() { 21 | super(SKYWARS_MODES); 22 | } 23 | 24 | public getProfile( 25 | base: BaseProfileProps, 26 | { mode }: ProfileData 27 | ): JSX.Element { 28 | return ; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /apps/discord-bot/src/commands/smashheroes/smashheroes.command.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import { 10 | BaseHypixelCommand, 11 | BaseProfileProps, 12 | ProfileData, 13 | } from "#commands/base.hypixel-command"; 14 | import { Command } from "@statsify/discord"; 15 | import { SMASH_HEROES_MODES, SmashHeroesModes } from "@statsify/schemas"; 16 | import { SmashHeroesProfile } from "./smashheroes.profile.js"; 17 | 18 | @Command({ description: (t) => t("commands.smashheroes") }) 19 | export class SmashHeroesCommand extends BaseHypixelCommand { 20 | public constructor() { 21 | super(SMASH_HEROES_MODES); 22 | } 23 | 24 | public getProfile( 25 | base: BaseProfileProps, 26 | { mode }: ProfileData 27 | ): JSX.Element { 28 | return ; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /apps/discord-bot/src/commands/speeduhc/speeduhc.command.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import { 10 | BaseHypixelCommand, 11 | BaseProfileProps, 12 | ProfileData, 13 | } from "#commands/base.hypixel-command"; 14 | import { Command } from "@statsify/discord"; 15 | import { SPEED_UHC_MODES, SpeedUHCModes } from "@statsify/schemas"; 16 | import { SpeedUHCProfile } from "./speeduhc.profile.js"; 17 | 18 | @Command({ description: (t) => t("commands.speeduhc") }) 19 | export class SpeedUHCCommand extends BaseHypixelCommand { 20 | public constructor() { 21 | super(SPEED_UHC_MODES); 22 | } 23 | 24 | public getProfile( 25 | base: BaseProfileProps, 26 | { mode }: ProfileData 27 | ): JSX.Element { 28 | return ; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /apps/discord-bot/src/commands/tntgames/tntgames.command.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import { BaseHypixelCommand, type BaseProfileProps, type ProfileData } from "#commands/base.hypixel-command"; 10 | import { Command } from "@statsify/discord"; 11 | import { type TNTGamesModes, TNT_GAMES_MODES } from "@statsify/schemas"; 12 | import { TNTGamesProfile } from "./tntgames.profile.js"; 13 | 14 | @Command({ description: (t) => t("commands.tntgames") }) 15 | export class TNTGamesCommand extends BaseHypixelCommand { 16 | public constructor() { 17 | super(TNT_GAMES_MODES); 18 | } 19 | 20 | public getProfile(base: BaseProfileProps, { mode }: ProfileData): JSX.Element { 21 | return ; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /apps/discord-bot/src/commands/turbokartracers/turbokartracers.command.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import { BaseHypixelCommand, BaseProfileProps } from "#commands/base.hypixel-command"; 10 | import { Command } from "@statsify/discord"; 11 | import { TURBO_KART_RACERS_MODES, TurboKartRacersModes } from "@statsify/schemas"; 12 | import { TurboKartRacersProfile } from "./turbokartracers.profile.js"; 13 | 14 | @Command({ description: (t) => t("commands.turbokartracers") }) 15 | export class TurboKartRacersCommand extends BaseHypixelCommand { 16 | public constructor() { 17 | super(TURBO_KART_RACERS_MODES); 18 | } 19 | 20 | public getProfile(base: BaseProfileProps): JSX.Element { 21 | return ; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /apps/discord-bot/src/commands/uhc/uhc.command.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import { 10 | BaseHypixelCommand, 11 | BaseProfileProps, 12 | ProfileData, 13 | } from "#commands/base.hypixel-command"; 14 | import { Command } from "@statsify/discord"; 15 | import { UHCModes, UHC_MODES } from "@statsify/schemas"; 16 | import { UHCProfile } from "./uhc.profile.js"; 17 | 18 | @Command({ description: (t) => t("commands.uhc") }) 19 | export class UHCCommand extends BaseHypixelCommand { 20 | public constructor() { 21 | super(UHC_MODES); 22 | } 23 | 24 | public getProfile( 25 | base: BaseProfileProps, 26 | { mode }: ProfileData 27 | ): JSX.Element { 28 | return ; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /apps/discord-bot/src/commands/vampirez/vampirez.command.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import { 10 | BaseHypixelCommand, 11 | BaseProfileProps, 12 | ProfileData, 13 | } from "#commands/base.hypixel-command"; 14 | import { Command } from "@statsify/discord"; 15 | import { VAMPIREZ_MODES, VampireZModes } from "@statsify/schemas"; 16 | import { VampireZProfile } from "./vampirez.profile.js"; 17 | 18 | @Command({ description: (t) => t("commands.vampirez") }) 19 | export class VampireZCommand extends BaseHypixelCommand { 20 | public constructor() { 21 | super(VAMPIREZ_MODES); 22 | } 23 | 24 | public getProfile( 25 | base: BaseProfileProps, 26 | { mode }: ProfileData 27 | ): JSX.Element { 28 | return ; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /apps/discord-bot/src/commands/walls/walls.command.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import { BaseHypixelCommand, BaseProfileProps } from "#commands/base.hypixel-command"; 10 | import { Command } from "@statsify/discord"; 11 | import { WALLS_MODES, WallsModes } from "@statsify/schemas"; 12 | import { WallsProfile } from "./walls.profile.js"; 13 | 14 | @Command({ description: (t) => t("commands.walls") }) 15 | export class WallsCommand extends BaseHypixelCommand { 16 | public constructor() { 17 | super(WALLS_MODES); 18 | } 19 | 20 | public getProfile(base: BaseProfileProps): JSX.Element { 21 | return ; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /apps/discord-bot/src/commands/warlords/tables/deathmatch.table.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import { Table } from "#components"; 10 | import type { LocalizeFunction } from "@statsify/discord"; 11 | import type { Warlords } from "@statsify/schemas"; 12 | 13 | export interface WarlordsDeathmatchTableProps { 14 | warlords: Warlords; 15 | t: LocalizeFunction; 16 | } 17 | 18 | export const WarlordsDeathmatchTable = ({ warlords, t }: WarlordsDeathmatchTableProps) => ( 19 | 20 | 21 | 22 | 23 | 24 | 25 | ); 26 | -------------------------------------------------------------------------------- /apps/discord-bot/src/commands/warlords/tables/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | export * from "./classes.table.js"; 10 | export * from "./capture-the-flag.table.js"; 11 | export * from "./domination.table.js"; 12 | export * from "./overall.table.js"; 13 | export * from "./deathmatch.table.js"; 14 | -------------------------------------------------------------------------------- /apps/discord-bot/src/commands/warlords/warlords.command.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import { 10 | BaseHypixelCommand, 11 | BaseProfileProps, 12 | ProfileData, 13 | } from "#commands/base.hypixel-command"; 14 | import { Command } from "@statsify/discord"; 15 | import { WARLORDS_MODES, WarlordsModes } from "@statsify/schemas"; 16 | import { WarlordsProfile } from "./warlords.profile.js"; 17 | 18 | @Command({ description: (t) => t("commands.warlords") }) 19 | export class WarlordsCommand extends BaseHypixelCommand { 20 | public constructor() { 21 | super(WARLORDS_MODES); 22 | } 23 | 24 | public getProfile( 25 | base: BaseProfileProps, 26 | { mode }: ProfileData 27 | ): JSX.Element { 28 | return ; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /apps/discord-bot/src/commands/woolgames/woolgames.command.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import { 10 | BaseHypixelCommand, 11 | BaseProfileProps, 12 | ProfileData, 13 | } from "#commands/base.hypixel-command"; 14 | import { Command } from "@statsify/discord"; 15 | import { WOOLGAMES_MODES, WoolGamesModes } from "@statsify/schemas"; 16 | import { WoolGamesProfile } from "./woolgames.profile.js"; 17 | 18 | @Command({ description: (t) => t("commands.woolgames") }) 19 | export class WoolGamesCommand extends BaseHypixelCommand { 20 | public constructor() { 21 | super(WOOLGAMES_MODES); 22 | } 23 | 24 | public getProfile( 25 | base: BaseProfileProps, 26 | { mode }: ProfileData 27 | ): JSX.Element { 28 | return ; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /apps/discord-bot/src/components/Background.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import type { Canvas, Image } from "skia-canvas"; 10 | 11 | export interface BackgroundProps { 12 | background: Canvas | Image; 13 | children: JSX.Children; 14 | } 15 | 16 | export const Background = ({ background, children }: BackgroundProps) => ( 17 | 18 | {children} 19 | 20 | ); 21 | -------------------------------------------------------------------------------- /apps/discord-bot/src/components/Header/HeaderNametag.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import { If } from "../If.js"; 10 | import type { Canvas, Image } from "skia-canvas"; 11 | 12 | export interface HeaderNametagProps { 13 | name: string; 14 | badge?: Image | Canvas; 15 | size?: number; 16 | } 17 | 18 | export const HeaderNametag = ({ name, badge, size = 4 }: HeaderNametagProps) => ( 19 | 20 | {(badge) => } 21 | 22 | §^{size}^{name} 23 | 24 | 25 | ); 26 | -------------------------------------------------------------------------------- /apps/discord-bot/src/components/Header/index.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | export * from "./Header.js"; 10 | export * from "./HeaderNametag.js"; 11 | export * from "./progression.js"; 12 | -------------------------------------------------------------------------------- /apps/discord-bot/src/components/Historical/Exclude.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import { If } from "../If.js"; 10 | import type { ProfileTime } from "#commands/base.hypixel-command"; 11 | 12 | export interface HistoricalExcludeProps { 13 | time: ProfileTime; 14 | children: JSX.Children; 15 | } 16 | 17 | export const HistoricalExclude = ({ time, children }: HistoricalExcludeProps) => ( 18 | {children} 19 | ); 20 | -------------------------------------------------------------------------------- /apps/discord-bot/src/components/Historical/Include.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import { If } from "../If.js"; 10 | import type { ProfileTime } from "#commands/base.hypixel-command"; 11 | 12 | export interface HistoricalIncludeProps { 13 | time: ProfileTime; 14 | children: JSX.Children; 15 | } 16 | 17 | export const HistoricalInclude = ({ time, children }: HistoricalIncludeProps) => ( 18 | {children} 19 | ); 20 | -------------------------------------------------------------------------------- /apps/discord-bot/src/components/Historical/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import { HistoricalExclude } from "./Exclude.js"; 10 | import { HistoricalHeader } from "./Header.js"; 11 | import { HistoricalInclude } from "./Include.js"; 12 | import { HistoricalProgression } from "./Progression.js"; 13 | 14 | export const Historical = { 15 | header: HistoricalHeader, 16 | progression: HistoricalProgression, 17 | exclude: HistoricalExclude, 18 | include: HistoricalInclude, 19 | }; 20 | 21 | export type { HistoricalTimeData } from "./Header.js"; 22 | -------------------------------------------------------------------------------- /apps/discord-bot/src/components/If.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import { noop } from "@statsify/util"; 10 | import { useChildren } from "@statsify/rendering"; 11 | 12 | export interface IfProps { 13 | condition: T | undefined | null | false; 14 | children: JSX.Children | JSX.Children<(data: T) => JSX.Children>; 15 | } 16 | 17 | export function If({ 18 | children: _children, 19 | condition, 20 | }: IfProps): JSX.Element | null { 21 | const children = useChildren(_children); 22 | 23 | if (condition) { 24 | return <>{typeof children[0] === "function" ? children[0](condition) : children}; 25 | } 26 | 27 | return noop(); 28 | } 29 | -------------------------------------------------------------------------------- /apps/discord-bot/src/components/Multiline.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import { Text, useChildren } from "@statsify/rendering"; 10 | 11 | export const Multiline = (props: Text.TextProps) => { 12 | const children = useChildren(props.children); 13 | 14 | if (props.margin === undefined) props.margin = 1; 15 | 16 | const text = children 17 | .join(" ") 18 | .split("\n") 19 | .map((t) => {t}); 20 | 21 | return <>{text}; 22 | }; 23 | -------------------------------------------------------------------------------- /apps/discord-bot/src/components/Skin.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import { Image } from "skia-canvas"; 10 | 11 | export interface SkinProps { 12 | skin: Image; 13 | } 14 | 15 | /** 16 | * 17 | * @example 18 | * ```ts 19 | * const skin = new Image(); 20 | * 21 | * ``` 22 | */ 23 | export const Skin = ({ skin }: SkinProps) => { 24 | const width = 125; 25 | 26 | return ( 27 | 28 | 29 | 30 | ); 31 | }; 32 | -------------------------------------------------------------------------------- /apps/discord-bot/src/components/Table/TableRow.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import { useChildren } from "@statsify/rendering"; 10 | 11 | export interface TableRow { 12 | children: JSX.Children; 13 | } 14 | 15 | /** 16 | * @example 17 | * ```ts 18 | * 19 | * 20 | * 21 | * 22 | * 23 | * ``` 24 | */ 25 | export const TableRow = ({ children: _children }: TableRow) => { 26 | const children = useChildren(_children); 27 | const length = children.length; 28 | 29 | return ( 30 |
31 | {children.map((child) => ( 32 |
{child}
33 | ))} 34 |
35 | ); 36 | }; 37 | -------------------------------------------------------------------------------- /apps/discord-bot/src/components/Table/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import { Table as TableComponent } from "./Table.js"; 10 | import { TableData } from "./TableData.js"; 11 | import { TableRow } from "./TableRow.js"; 12 | import { TableSeparator } from "./TableSeparator.js"; 13 | 14 | export const Table = { 15 | table: TableComponent, 16 | td: TableData, 17 | tr: TableRow, 18 | ts: TableSeparator, 19 | }; 20 | -------------------------------------------------------------------------------- /apps/discord-bot/src/components/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | export * from "./Background.js"; 10 | export * from "./Container.js"; 11 | export * from "./Footer.js"; 12 | export * from "./Header/index.js"; 13 | export * from "./Historical/index.js"; 14 | export * from "./If.js"; 15 | export * from "./List.js"; 16 | export * from "./Multiline.js"; 17 | export * from "./ProgressBar.js"; 18 | export * from "./Sidebar.js"; 19 | export * from "./Skin.js"; 20 | export * from "./Table/index.js"; 21 | export * from "./GameList.js"; 22 | -------------------------------------------------------------------------------- /apps/discord-bot/src/lib/convert-color-codes.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | export const convertColorCodes = (content: string) => content 10 | .replaceAll(String.raw`\&`, "󰀀") 11 | .replace(/&\S/g, (m) => m.replace("&", "§")) 12 | .replaceAll("󰀀", "&"); 13 | 14 | -------------------------------------------------------------------------------- /apps/discord-bot/src/lib/format-position.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import { LocalizeFunction } from "@statsify/discord"; 10 | 11 | export const formatPosition = (t: LocalizeFunction, position: number): string => { 12 | let color = "§f"; 13 | 14 | switch (position) { 15 | case 1: 16 | color = "§#ffd700"; 17 | break; 18 | 19 | case 2: 20 | color = "§#c0c0c0"; 21 | break; 22 | 23 | case 3: 24 | color = "§#cd7f32"; 25 | break; 26 | } 27 | 28 | return `${color}#§l${t(position)}`; 29 | }; 30 | -------------------------------------------------------------------------------- /apps/discord-bot/src/lib/minecraft-head.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import { randomUUID } from "node:crypto"; 10 | 11 | export function minecraftHeadUrl(uuid: string) { 12 | const dashlessUuid = uuid.replaceAll("-", ""); 13 | return `https://crafatar.com/avatars/${dashlessUuid}?size=160&default=MHF_Steve&overlay&id=${randomUUID()}`; 14 | } 15 | -------------------------------------------------------------------------------- /apps/discord-bot/src/services/font-loader.service.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import { Container, Service } from "typedi"; 10 | import { FontRenderer } from "@statsify/rendering"; 11 | import { getMinecraftTexturePath } from "@statsify/assets"; 12 | 13 | const renderer = new FontRenderer(); 14 | const hdRenderer = new FontRenderer(); 15 | 16 | Container.set(FontRenderer, renderer); 17 | Container.set("HDFontRenderer", hdRenderer); 18 | 19 | @Service() 20 | export class FontLoaderService { 21 | public async init() { 22 | await renderer.loadImages(getMinecraftTexturePath("textures/font")); 23 | await hdRenderer.loadImages(getMinecraftTexturePath("textures/font", "hd")); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /apps/discord-bot/src/services/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | export * from "./font-loader.service.js"; 10 | -------------------------------------------------------------------------------- /apps/discord-bot/src/themes/boxes/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import * as HDBox from "./hd.box.js"; 10 | import * as UHDBox from "./uhd.box.js"; 11 | import { Box, Render } from "@statsify/rendering"; 12 | import { UserBoxes } from "@statsify/schemas"; 13 | 14 | export function getBoxRenderer(boxes: UserBoxes): Render { 15 | switch (boxes) { 16 | case UserBoxes.DEFAULT: 17 | return Box.render; 18 | 19 | case UserBoxes.HD: 20 | return HDBox.render; 21 | 22 | case UserBoxes.UHD: 23 | return UHDBox.render; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /apps/discord-bot/src/themes/renderer.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import { Container } from "typedi"; 10 | import { FontRenderer } from "@statsify/rendering"; 11 | import { UserFont } from "@statsify/schemas"; 12 | 13 | export function getFontRenderer(font: UserFont): FontRenderer { 14 | switch (font) { 15 | case UserFont.HD: 16 | return Container.get("HDFontRenderer"); 17 | 18 | default: 19 | return Container.get(FontRenderer); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /apps/discord-bot/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.base.json", 3 | "compilerOptions": { 4 | "jsx": "preserve", 5 | "baseUrl": "./src", 6 | }, 7 | "include": [ 8 | "src", 9 | "eslint.config.js" 10 | ] 11 | } -------------------------------------------------------------------------------- /apps/scripts/eslint.config.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import config from "../../eslint.config.js"; 10 | import globals from "globals"; 11 | 12 | export default [ 13 | { 14 | languageOptions: { globals: globals.node }, 15 | }, 16 | ...config, 17 | ]; 18 | -------------------------------------------------------------------------------- /apps/scripts/src/delete-sessions.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import { config } from "@statsify/util"; 10 | import { connect } from "mongoose"; 11 | 12 | const mongo = await connect(config("database.mongoUri")); 13 | 14 | const session = mongo.connection.db.collection("session"); 15 | 16 | await session.deleteMany(); 17 | 18 | console.log("Done!"); 19 | process.exit(0); 20 | -------------------------------------------------------------------------------- /apps/scripts/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.base.json", 3 | "include": [ 4 | "src", 5 | "eslint.config.js" 6 | ] 7 | } -------------------------------------------------------------------------------- /apps/site/components/About/about.module.scss: -------------------------------------------------------------------------------- 1 | .container { 2 | display: flex; 3 | flex-direction: column; 4 | justify-content: center; 5 | 6 | color: #ffffff; 7 | 8 | 9 | padding-left: 30px; 10 | padding-right: 30px; 11 | margin-bottom: 10px; 12 | 13 | text-align: center; 14 | 15 | h1 { 16 | font-size: 2.3rem; 17 | margin-bottom: 10px; 18 | } 19 | 20 | p { 21 | font-size: 1rem; 22 | } 23 | 24 | @media (min-width: 640px) { 25 | width: 25%; 26 | text-align: left; 27 | justify-content: flex-start; 28 | padding-left: 70px; 29 | padding-right: 70px; 30 | } 31 | } -------------------------------------------------------------------------------- /apps/site/components/About/index.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import styles from "./about.module.scss"; 10 | 11 | export const About = () => ( 12 |
13 |

About Us

14 |

15 | Statsify is an easy to use multipurpose Discord bot for viewing your Hypixel stats. 16 | Statsify can track statistics in several game modes on the Hypixel Network, such as 17 | Bed Wars, Sky Wars, Duels, and many other minigames. It is the #1 stat bot for 18 | tracking your progress and improvements while playing Minecraft. 19 |

20 |
21 | ); 22 | -------------------------------------------------------------------------------- /apps/site/components/Button/index.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import Link from "next/link"; 10 | import styles from "./button.module.scss"; 11 | 12 | export interface ButtonProps { 13 | children: React.ReactNode; 14 | link?: string; 15 | } 16 | 17 | export const Button = ({ link, children }: ButtonProps) => { 18 | if (link) 19 | return ( 20 | 21 | 22 | 23 | ); 24 | 25 | return ; 26 | }; 27 | -------------------------------------------------------------------------------- /apps/site/components/Code/code.module.scss: -------------------------------------------------------------------------------- 1 | .code { 2 | color: #ffffff; 3 | background-color: #0a0a0a; 4 | padding: 0.2em 0.4em; 5 | border-radius: 0.3em; 6 | 7 | font-family: "DejaVu Sans Mono", "Menlo", "Monaco", "Consolas", "Courier New", monospace; 8 | } -------------------------------------------------------------------------------- /apps/site/components/Code/index.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import styles from "./code.module.scss"; 10 | import { ReactNode } from "react"; 11 | 12 | export interface CodeProps { 13 | children: ReactNode; 14 | } 15 | 16 | export const Code = ({ children }: CodeProps) => ( 17 | {children} 18 | ); 19 | -------------------------------------------------------------------------------- /apps/site/components/Container/container.module.scss: -------------------------------------------------------------------------------- 1 | .container { 2 | width: 100%; 3 | 4 | display: flex; 5 | flex-direction: column; 6 | justify-content: center; 7 | align-items: center; 8 | } -------------------------------------------------------------------------------- /apps/site/components/Container/index.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import styles from "./container.module.scss"; 10 | import { ReactNode } from "react"; 11 | 12 | export interface ContainerProps { 13 | children: ReactNode; 14 | } 15 | 16 | export const Container = ({ children }: ContainerProps) => ( 17 |
{children}
18 | ); 19 | -------------------------------------------------------------------------------- /apps/site/components/Divider/divider.module.scss: -------------------------------------------------------------------------------- 1 | .divider { 2 | width: 40%; 3 | margin: 24px; 4 | height: 1px; 5 | background-color: rgba(255, 255, 255, 0.4); 6 | 7 | @media (max-width: 640px) { 8 | width: 90%; 9 | } 10 | } -------------------------------------------------------------------------------- /apps/site/components/Divider/index.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import styles from "./divider.module.scss"; 10 | 11 | export const Divider = () =>
; 12 | -------------------------------------------------------------------------------- /apps/site/components/Footer/footer.module.scss: -------------------------------------------------------------------------------- 1 | .footer { 2 | width: 100%; 3 | background-color: #111111; 4 | color: #ffffff; 5 | font-family: "Lexend Deca"; 6 | display: flex; 7 | flex-direction: column; 8 | align-items: center; 9 | gap: 16px; 10 | padding-top: 16px; 11 | padding-bottom: 16px; 12 | } 13 | 14 | .socials, 15 | .links { 16 | display: flex; 17 | flex-direction: row; 18 | justify-content: center; 19 | gap: 8px; 20 | } 21 | 22 | .links { 23 | padding-top: 4px; 24 | padding-bottom: 4px; 25 | 26 | @media (max-width: 640px) { 27 | flex-direction: column; 28 | } 29 | } 30 | 31 | .link { 32 | text-align: center; 33 | 34 | &:hover { 35 | cursor: pointer; 36 | text-decoration: underline; 37 | } 38 | } 39 | 40 | .copyright { 41 | padding-top: 4px; 42 | padding-bottom: 4px; 43 | } 44 | -------------------------------------------------------------------------------- /apps/site/components/Hero/Navbar.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import Image from "next/image"; 10 | import Logo from "../../public/banner.svg"; 11 | import styles from "./navbar.module.scss"; 12 | 13 | export const Navbar = () => ( 14 | 19 | ); 20 | -------------------------------------------------------------------------------- /apps/site/components/Hero/navbar.module.scss: -------------------------------------------------------------------------------- 1 | .nav { 2 | display: flex; 3 | flex-direction: row; 4 | justify-content: center; 5 | 6 | width: 100%; 7 | 8 | margin-top: 16px; 9 | } 10 | 11 | .branding { 12 | filter: drop-shadow(0px 0px 15px rgba(0, 0, 0, 0.8)); 13 | position: relative; 14 | 15 | width: 100%; 16 | min-height: 100px; 17 | 18 | @media (max-width: 640px) { 19 | width: 90%; 20 | } 21 | } -------------------------------------------------------------------------------- /apps/site/components/Invite/index.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import styles from "./invite.module.scss"; 10 | import { Button } from "../Button"; 11 | 12 | export const Invite = () => ( 13 |
14 |

What are you waiting for?

15 |

Invite Statsify today to enhance your Hypixel experience!

16 | 17 |
18 | ); 19 | -------------------------------------------------------------------------------- /apps/site/components/Invite/invite.module.scss: -------------------------------------------------------------------------------- 1 | .invite { 2 | display: flex; 3 | flex-direction: column; 4 | align-items: center; 5 | justify-content: center; 6 | 7 | color: #ffffff; 8 | text-align: center; 9 | 10 | h1, 11 | h2, 12 | p { 13 | margin-bottom: 32px; 14 | } 15 | 16 | h1 { 17 | font-size: 3rem; 18 | 19 | @media (max-width: 640px) { 20 | font-size: 2.5rem; 21 | } 22 | } 23 | 24 | p { 25 | font-size: 1.2rem; 26 | } 27 | 28 | button { 29 | font-size: 1.5rem; 30 | } 31 | 32 | margin: 64px; 33 | } 34 | -------------------------------------------------------------------------------- /apps/site/components/Layout.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Statsify 3 | * 4 | * This source code is licensed under the GNU GPL v3 license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * https://github.com/Statsify/statsify/blob/main/LICENSE 7 | */ 8 | 9 | import { Container } from "./Container"; 10 | import { Footer } from "./Footer"; 11 | import { Hero } from "./Hero"; 12 | import { ReactNode } from "react"; 13 | 14 | export interface LayoutProps { 15 | children: ReactNode; 16 | } 17 | 18 | export const Layout = ({ children }: LayoutProps) => ( 19 | <> 20 | 21 |
22 | {children} 23 |
24 |