0

I've had a bot working for my discord server for a while now and it worked perfectly, but suddenly one day it stopped sending the greeting messages. I don't know why it has happened, but I've tried everything I can and nothing works.

The console displays no error and no message is sent to the channel.

Here's the code:

client.on('guildMemberAdd', member => {
    const channel = member.guild.channels.find(ch => ch.name === 'greeting-channel');
    if (!channel) return;
    channel.send(`Welcome to the server, ${member}!`);
});

Please, help me!

Baneina
  • 9
  • 2
  • 2
    Does this answer your question? [None of my discord.js guildmember events are emitting, my user caches are basically empty, and my functions are timing out?](https://stackoverflow.com/questions/64559390/none-of-my-discord-js-guildmember-events-are-emitting-my-user-caches-are-basica) – Lioness100 Nov 08 '20 at 16:55
  • You need to turn on intents in the Dev Portal to get this event from now on. – Shubham Parihar Nov 08 '20 at 16:56
  • Ok, I'll give it a try, Thank you! – Baneina Nov 08 '20 at 17:10

0 Answers0