Files
aurorabot/shared/modules/inventory/AGENTS.md
syntaxbullet 6abbd4652a
Some checks failed
Deploy to Production / test (push) Failing after 33s
Refresh repository documentation
- Rewrite AGENTS and README files to match the current app layout
- Document API routes, trivia UI, and the active panel design language
2026-04-09 21:10:10 +02:00

998 B

Inventory module

Main methods

  • addItem()
  • removeItem()
  • getInventory()
  • buyItem()
  • getItem()
  • useItem()
  • getAutocompleteItems()

Rules

  • max slots and max stack size come from runtime config
  • removing the last quantity deletes the inventory row
  • buyItem() uses economyService.modifyUserBalance() and addItem() in one transaction

Item usage

  • item behavior is driven by items.usageData
  • items without usageData.effects are not usable
  • usageData.consume controls whether the item is removed after use
  • effect execution is routed through effect.registry.ts

To add a new effect type, update:

  • shared/lib/constants.ts
  • effect.types.ts
  • effect.handlers.ts
  • effect.registry.ts

Notes

  • XP boost and temp-role effects are timer-based and overwrite existing timers rather than stacking
  • temp-role effects only write timer data; actual Discord role assignment is handled outside this service
  • autocomplete only returns usable items