feat: Introduce modular inventory item effect handling and centralize Discord interaction routing.

This commit is contained in:
syntaxbullet
2025-12-24 12:20:42 +01:00
parent f75cc217e9
commit fcc82292f2
6 changed files with 145 additions and 71 deletions

View File

@@ -0,0 +1,18 @@
import {
handleAddXp,
handleAddBalance,
handleReplyMessage,
handleXpBoost,
handleTempRole,
handleColorRole
} from "./handlers";
import type { EffectHandler } from "./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
};