Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

205
Views
Discord bot doesn't send a greeting message

The problem is that Discord bot doesn't send the greeting message when a new member joins.

node version is 16

discord.js is v13

The terminal shows no errors. And this is the code:


bot.on('ready', () =>{
    console.log('This bot is online!');
})

bot.on('guildMemberAdd', guildMember=>{
    const User = guildMember.user
        const channel = guildMember.guild.channels.cache.find(channel => channel.id == '798928691988004897');
        
        console.log(User)
    
        const embed = new Discord.MessageEmbed()
            .setColor('#0099ff')
            .setTitle('Welcome')
            .setDescription(`Welcome to the server <@${User.id}>`)
            .setThumbnail(`${User.avatarURL()}`)
        
            channel.send({embeds :[embed]});
});

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Looks like you do not have the "guild member" intents enabled for the bot to detect changes made to guild members

go to Discord Developer Portal and navigate to your application and enable server member intent Developer Portal > Bot App > Bot > Enable Server member intent

And you need to have this intent enabled within your code as well

const { Intents, Client } = require('discord.js'); // require other classes as per your bot needs
const intents = [Intents.FLAGS.GUILD_MEMBERS]; // Add other related intents
const bot = new Client({ intents: intents });

// finish your code with events and stuff
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!