feat: Implement dynamic event loading and refactor event handlers into dedicated files.

This commit is contained in:
syntaxbullet
2025-12-14 22:21:28 +01:00
parent 32c614975e
commit 1eace32aa1
8 changed files with 166 additions and 78 deletions

View File

@@ -0,0 +1,13 @@
import { Events } from "discord.js";
import type { Event } from "@lib/types";
const event: Event<Events.GuildMemberAdd> = {
name: Events.GuildMemberAdd,
execute: async (member) => {
const role = member.guild.roles.cache.find(role => role.name === "Visitor");
if (!role) return;
await member.roles.add(role);
},
};
export default event;