Lokdei / Bert
Lokdei / Bert
DIAdiscord.js - Imagine an app
Created by Lokdei / Bert on 4/20/2025 in #djs-questions
Fix Welcome @unknown-user with guildMemberAdd
I've implemented the .get(key) improvement and that's working great! Thank you for the suggestion. I'm still trying to make sense of the allowed_mentions. implementation. I've changed the code to allow a mention (I think) but it's still showing @unkown-user. Do I need to change something in the client constructor as well? Or am i missing something obvious.
const sendOptions: MessageCreateOptions = {
content: greeting,
allowedMentions: { users: [newMember.id] },
components: [],
};

if (
config.enableWelcomeClanOnboarding ||
config.enableWelcomeFriendOnboarding
) {
sendOptions.components = [joinButtons];
}

try {
logger.info("Sending welcome text to welcome channel");
await welcomeChannel.send(sendOptions);
} catch (error) {
logger.error("Unable to send welcome text to welcome channel", error);
}
const sendOptions: MessageCreateOptions = {
content: greeting,
allowedMentions: { users: [newMember.id] },
components: [],
};

if (
config.enableWelcomeClanOnboarding ||
config.enableWelcomeFriendOnboarding
) {
sendOptions.components = [joinButtons];
}

try {
logger.info("Sending welcome text to welcome channel");
await welcomeChannel.send(sendOptions);
} catch (error) {
logger.error("Unable to send welcome text to welcome channel", error);
}
9 replies
DIAdiscord.js - Imagine an app
Created by Lokdei / Bert on 4/20/2025 in #djs-questions
Fix Welcome @unknown-user with guildMemberAdd
This is an information goldmine, i'll get to do some testing! Thank you for your detailed answer! ❤️
9 replies
DIAdiscord.js - Imagine an app
Created by Lokdei / Bert on 4/20/2025 in #djs-questions
Fix Welcome @unknown-user with guildMemberAdd
The full source code of the welcome file: https://pastebin.com/fyjaQGtf
9 replies
DIAdiscord.js - Imagine an app
Created by Lokdei / Bert on 4/20/2025 in #djs-questions
Fix Welcome @unknown-user with guildMemberAdd
npm list discord.js [email protected] C:\Users\Bert\gitroot\cafebaas-discord-bot ├─┬ @discordx/[email protected] │ └── [email protected] deduped ├─┬ @discordx/[email protected] │ └── [email protected] deduped ├── [email protected] └─┬ [email protected] └── [email protected] deduped node -v v20.13.0
9 replies