feat: update booster role eligibility logic and refactor related services

This commit is contained in:
MythEclipse
2026-05-16 00:06:13 +07:00
parent 972400e4e4
commit acd4648d49
16 changed files with 478 additions and 40 deletions
+3 -7
View File
@@ -1,13 +1,9 @@
export type BoostEligibilityInput = {
verifiedBoostCount: number | null;
isBoosting: boolean;
};
export function assertBoostEligibility(input: BoostEligibilityInput): void {
if (input.verifiedBoostCount === null) {
throw new Error("Boost eligibility cannot be verified");
}
if (input.verifiedBoostCount < 2) {
throw new Error("User must have at least two server boosts to claim a custom role");
if (!input.isBoosting) {
throw new Error("User must be currently boosting to claim a custom role");
}
}