GuildMemberAdd Not Workingg

Hello! I'm attempting to assign an 'unverified' role whenever someone new joins my server, but the bot doesn't appear to be registering new members - I never receive the console log - do I have some sort of error?
client.on(Events.GuildMemberAdd, async (member) => {
console.log("Hello");
if (member.user.bot) {
return;
}

await member.edit({
roles: [roles.Unverified],
});
});
client.on(Events.GuildMemberAdd, async (member) => {
console.log("Hello");
if (member.user.bot) {
return;
}

await member.edit({
roles: [roles.Unverified],
});
});
5 Replies
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Idris
Idris3y ago
intents GuildMembers and Guilds are required
Tyranasaurus
TyranasaurusOP3y ago
Ah, thank you You think it'd give you an error for that
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Tyranasaurus
TyranasaurusOP3y ago
Ah right that makes sense I was thinking about when I used discord.py because it did tell you, but thats because I wasn't using a listener then
Want results from more Discord servers?
Add your server