Command Not Working With No Errors

const bot = new Discord.Client();
const client = new Discord.Client();
bot.on('guildMemberUpdate', async (oldMember, newMember) => {
    if(newMember.displayName === "bad word"){
     client.users.cache.get('573208975143862283').send('LOLOLOL')
        }
  });

Edit: Sorry I posted without any text, my  command isn't working with no errors. I don't know why this is happening and yeah.

Hey @okboomer1234321,

Have you omitted the client.login(TOKEN) on purpose or did you forget to add it?

Also, why would you need two clients at the same time (bot and client)? One is enough, and you should do bot.login() or client.login() with the appropriate Discord tokens.

Hope this helps!

1 Like