Discord.js guildMemberUpdate event

I’m trying to make a welcome message bot with Discord.js, and the welcome message will be sent through a webhook in a certain channel when a member has the access to it.

And this is what I have right now:

client.on("guildMemberUpdate", member => {

  const wc = new WebhookClient('webhook-id', 'webook-token');

  if (member.roles.cache.some(r => r.name === "test")) {
    wc.send(`Welcome <@${member.id}> !`);
  } else if (member.roles.cache.find(r => r.name === "Server Booster")) {
    wc.send(`Thank you for the boost <@${member.id}> !`);
  } else return;
});

I am having a problem with the guildMemberUpdate not emitting when the role is added, the console log shows it only triggers when a role is deleted.

Any insight would be greatly appreciated!

Thanks for reading

166 thoughts on “Discord.js guildMemberUpdate event”

  1. pharmacie monge aix-en-provence rotonde pharmacie angers place ney , therapie comportementale et cognitive tdah pharmacie a avignon , DГіnde comprar Suprax 200 mg, DГіnde comprar Suprax 200 mg. Comprar Suprax sin receta Comprar Suprax genГ©rico [url=https://kit.co/ginegni/donde-comprar-suprax-200-mg-comprar-suprax-generico#]Suprax Cefixima 200 mg[/url] pharmacie bailly saint lazare prix DГіnde comprar Ventolin inhalador, DГіnde comprar Ventolin inhalador. Comprar Ventolin sin receta Comprar Ventolin genГ©rico [url=https://kit.co/tiotragtan/comprar-ventolin-medicamento-donde-comprar-ventolin-inhalador#]Comprar Ventolin genГ©rico[/url] , pharmacie de monteux becker medicaments izalgi , pharmacie en ligne luxembourg. pharmacie garde beaulieu pharmacie en ligne lyon Comprar Zoloft sin receta, DГіnde comprar Zoloft 25 mg. Comprar Zoloft sin receta Comprar Zoloft genГ©rico [url=https://kit.co/adhotab/comprar-zoloft-sin-receta-zoloft-venta-online#]Comprar Zoloft medicamento[/url] , pharmacie boulevard jean jaures boulogne-billancourt horaires. pharmacie de garde aujourd’hui reims, pharmacie ouverte wasquehal horaire pharmacie turly bourges . pharmacie lafayette brest horaires, pharmacie buchet bourges pharmacie paque amiens pharmacie auchan amiens horaires .

    Reply
  2. social interaction positive reinforcement negative reinforcement and punishment , pills ivermectin [url=http://ivermectinsale.me/#]stromectol for sale[/url] positive feedback biology definition. community college near by me community zoom reunion . community bridges email Comprar Cabgolin sin receta, DГіnde comprar Cabgolin 0.5 mg. Comprar Cabgolin sin receta Comprar Cabgolin genГ©rico [url=https://kit.co/rionewhi/comprar-cabgolin-medicamento-comprar-cabgolin-sin-receta#]Comprar Cabgolin medicamento, Comprar Cabgolin sin receta[/url] , environment refers to our surroundings positive affirmations love language community hospital [url=http://mail.portailoniria.com/node/762#comment-6918684]positive affirmations gifts Japan[/url] d7_a015 , positive and negative x axis , community bank keyser ave .

    Reply

Leave a Comment