docs: add JSDoc to service public methods

One-line JSDoc on 82 methods across 11 service files for quick
scanning without reading full implementations.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
syntaxbullet
2026-04-02 11:36:18 +02:00
parent 5f8819bb46
commit 5bd390b4ee
11 changed files with 82 additions and 10 deletions

View File

@@ -213,12 +213,20 @@ async function clearCaches() {
}
export const lootdropService = {
/** Delete expired lootdrops from the database; optionally includes already-claimed ones. */
cleanupExpiredLootdrops,
/** Record a message in a channel and return whether a lootdrop should spawn based on activity and RNG. */
trackActivity,
/** Calculate a random lootdrop reward amount and currency, with optional overrides. */
calculateReward,
/** Save a spawned lootdrop to the database with a 10-minute expiration. */
persistLootdrop,
/** Remove a lootdrop by message ID and return its channel ID for Discord cleanup. */
removeLootdrop,
/** Atomically claim a lootdrop for a user; credits reward to their balance. */
tryClaim,
/** Get current lootdrop system state including the most active channel and spawn config. */
getLootdropState,
/** Clear all in-memory activity tracking and cooldown caches. */
clearCaches,
};