fix greeting functionality

This commit is contained in:
mo
2026-02-27 09:30:47 +01:00
parent 58426ca45d
commit 331fea2c10
7 changed files with 22 additions and 17 deletions

View File

@@ -12,7 +12,7 @@ export const config: z.output<typeof ConfigSchema> = {
help: "1321860125127872605",
introduction: "1321473655523246171",
news: "1321953521435934741",
"off-topic": "1316153372507639855",
general: "1316153372507639855",
rules: "1316153372507639849",
testing: "1451310086864507112",
welcome: "1316153372507639852",

View File

@@ -7,12 +7,12 @@ const configInput: z.input<typeof ConfigSchema> = {
text: {
bot: "1473270893617315899",
bump: "",
feedback: "",
feedback: "1475069278198489089",
help: "",
introduction: "1473060169972367394",
news: "",
log: "1473380467480031548",
"off-topic": "1473029758951358491",
general: "1473029758951358491",
rules: "1473070476174811195",
testing: "",
welcome: "1473270114214928440",

View File

@@ -12,14 +12,13 @@ client.on(Events.GuildMemberAdd, async (member: GuildMember) => {
return;
}
const channel = await client.channels.fetch(config.channelMapping.text.log);
const channel = await client.channels.fetch(
config.channelMapping.text.welcome,
);
await logChannelService.sendLogMessage(
`new member: <@${member.user.id}> (${member.user.username}) joined the server.`,
);
await greetingService.sendGreeting(member.user.username, channel);
await logChannelService.sendLogMessage(
`new member: <@${member.user.id}> (${member.user.username}) joined the server.`,
);
await greetingService.sendDmGreeting(member.user, member.user.username);
await logChannelService.sendLogMessage(
`new member: <@${member.user.id}> (${member.user.username}) joined the server.`,
);
});