Move terminal.service.ts and prune.service.ts entirely to bot/modules/ since they are Discord-specific. Split lootdrop.service.ts: pure logic (activity tracking, DB ops, claim) stays in shared/, Discord operations (message sending, channel interactions) move to bot/modules/economy/ lootdrop.handler.ts. Move effect registry/handlers/types from bot/ to shared/modules/inventory/ since they contain no Discord.js imports and are needed by inventory.service.ts in shared. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
23 lines
748 B
TypeScript
23 lines
748 B
TypeScript
import { Events } from "discord.js";
|
|
import { userService } from "@shared/modules/user/user.service";
|
|
import { levelingService } from "@shared/modules/leveling/leveling.service";
|
|
import type { Event } from "@shared/lib/types";
|
|
|
|
const event: Event<Events.MessageCreate> = {
|
|
name: Events.MessageCreate,
|
|
execute: async (message) => {
|
|
if (message.author.bot) return;
|
|
if (!message.guild) return;
|
|
|
|
const user = await userService.getUserById(message.author.id);
|
|
if (!user) return;
|
|
|
|
levelingService.processChatXp(message.author.id);
|
|
|
|
// Activity Tracking for Lootdrops
|
|
import("@modules/economy/lootdrop.handler").then(m => m.processLootdropMessage(message));
|
|
},
|
|
};
|
|
|
|
export default event;
|