Skip to content
Advertisement

Bot isn’t listening to guildMemberAdd

I signed up just a few moments ago because something was really bothering me: I have the following code:

JavaScript

For some reason, when I leave and rejoin the server, the embed isn’t sending at all to the channel. I am getting no errors in the console. Any ideas on what may have gone wrong? Thanks. 🙂

Advertisement

Answer

You need ‘Server Members Intent’ enabled when you invite the bot. Go to Discord Developer Portal > Bot > Scroll to bottom > make sure server members intent is checked server members intent box checked

You should also be able to enable it manually in your code, but idrk how to do it. I think it’s like this:

JavaScript

Also, quick thing: to use ${variableHere} in a string, it must be a string with backticks ( ` ), like this:

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement