feat: Implement welcome messages for new enrollments using a new webhook utility and refactor the admin webhook command to utilize it.

This commit is contained in:
syntaxbullet
2025-12-20 20:59:44 +01:00
parent 65f5dc3721
commit 5833224ba9
4 changed files with 96 additions and 27 deletions

View File

@@ -47,6 +47,8 @@ export interface GameConfigType {
};
studentRole: string;
visitorRole: string;
welcomeChannelId?: string;
welcomeMessage?: string;
}
// Initial default config state
@@ -106,7 +108,9 @@ const configSchema = z.object({
}),
studentRole: z.string(),
visitorRole: z.string()
visitorRole: z.string(),
welcomeChannelId: z.string().optional(),
welcomeMessage: z.string().optional()
});
export function reloadConfig() {
@@ -139,6 +143,8 @@ export function reloadConfig() {
config.lootdrop = rawConfig.lootdrop;
config.studentRole = rawConfig.studentRole;
config.visitorRole = rawConfig.visitorRole;
config.welcomeChannelId = rawConfig.welcomeChannelId;
config.welcomeMessage = rawConfig.welcomeMessage;
console.log("🔄 Config reloaded from disk.");
}