fix(economy): improve daily cooldown message and consolidate UserError class

This commit is contained in:
syntaxbullet
2026-01-14 16:26:27 +01:00
parent 4af2690bab
commit 915f1bc4ad
18 changed files with 52 additions and 41 deletions

View File

@@ -87,7 +87,7 @@ export const economyService = {
});
if (cooldown && cooldown.expiresAt > now) {
throw new UserError(`Daily already claimed today. Next claim <t:${Math.floor(cooldown.expiresAt.getTime() / 1000)}:F>`);
throw new UserError(`You have already claimed your daily reward today.\nNext claim available: <t:${Math.floor(cooldown.expiresAt.getTime() / 1000)}:F> (<t:${Math.floor(cooldown.expiresAt.getTime() / 1000)}:R>)`);
}
// Get user for streak logic