refactor(inventory): flatten effects directory structure
Move effect handlers from effects/ subdirectory to flat structure: - effects/handlers.ts → effect.handlers.ts - effects/registry.ts → effect.registry.ts - effects/types.ts → effect.types.ts Update import path in inventory.service.ts from '@/modules/inventory/effects/registry' to '@/modules/inventory/effect.registry'. This reduces directory nesting and follows the convention of keeping module files flat unless there are 5+ files.
This commit is contained in:
20
bot/modules/inventory/effect.registry.ts
Normal file
20
bot/modules/inventory/effect.registry.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import {
|
||||
handleAddXp,
|
||||
handleAddBalance,
|
||||
handleReplyMessage,
|
||||
handleXpBoost,
|
||||
handleTempRole,
|
||||
handleColorRole,
|
||||
handleLootbox
|
||||
} from "./effect.handlers";
|
||||
import type { EffectHandler } from "./effect.types";
|
||||
|
||||
export const effectHandlers: Record<string, EffectHandler> = {
|
||||
'ADD_XP': handleAddXp,
|
||||
'ADD_BALANCE': handleAddBalance,
|
||||
'REPLY_MESSAGE': handleReplyMessage,
|
||||
'XP_BOOST': handleXpBoost,
|
||||
'TEMP_ROLE': handleTempRole,
|
||||
'COLOR_ROLE': handleColorRole,
|
||||
'LOOTBOX': handleLootbox
|
||||
};
|
||||
Reference in New Issue
Block a user