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

246
Views
guildMemberRemove no funciona a diferencia de guildMemberAdd

No sé por qué "guildMemberRemove" no está activado cuando un miembro abandona el servidor.

De hecho, cuando coloco un archivo console.log("test"), no aparece.

Sin embargo, "guildMemberAdd" no tiene ningún problema y los mensajes se envían.

¿Qué debo cambiar?

Este es mi código:

 const Discord = require('discord.js'); const client = new Discord.Client({ intents: ["GUILDS", "GUILD_MESSAGES", "GUILD_MEMBERS", "GUILD_INVITES"] }); const ID_NEW_MEMBER_CHANNEL = "943499711418093588"; const ID_LOG_CHANNEL = "942887622748037200"; client.on("ready", async () => { const logChannel = client.channels.cache.get(ID_LOG_CHANNEL); client.user.setPresence({ activities: [{ name: "Mario Sokoban" }] }); console.clear(); console.log("Nobody like you.") }); client.on('guildMemberAdd', (member) => { const channel = client.channels.cache.get(ID_NEW_MEMBER_CHANNEL); const embedArrivee = [`L'incroyable ${member} est bien arrivé :partying_face::nerd:`, `Wow, ${member} est entré par effraction :dizzy_face::exploding_head:`, `Que vois-je ?! Un ${member} sauvage :partying_face::yum:`, `Le saviez-vous ? ${member} vient de se poser à bord :partying_face:`, `Est-ce un oiseau, un avion, une souris, ah non ! C'est ${member} qui se joint à nous :partying_face::grin:`, `Que tout le monde reste calme, ${member} est parmis nous :shushing_face::grimacing:`]; const randomEmbed = embedArrivee[Math.floor(Math.random() * embedArrivee.length)]; member.guild.invites.fetch().then(newInvites => { const oldInvites = invites.get(member.guild.id); const invite = newInvites.find(i => i.uses > oldInvites.get(i.code)); }); const bienvenue = new Discord.MessageEmbed() .setColor('#88d4ef') .setDescription(randomEmbed) //.setFooter({ text: 'Merci <@' + invite.inviter.id + '> !'}); channel.send({ embeds: [bienvenue] }); }); client.on('guildMemberRemove', (member) => { const channel = client.channels.cache.get(ID_NEW_MEMBER_CHANNEL); const embedExit = [`Oh non ! ${member} nous a quitté :cry:`, `Fatal Error : ${member} a disparu du serveur :cry:`, `Incroyable :dizzy_face: ${member} est parti sans payé ma bière :rage:`, `Commandant, j'ai raté ma cible. ${member} a disparu :cry:`, `Je crois que ${member} a disparu :cry:, mais le beau temps est revenu :sunglasses:`, `Mais c'est horrible :scream: ${member} est tombé de la falaise :scream:`]; const randomEmbed = embedExit[Math.floor(Math.random() * embedExit.length)]; const bye = new Discord.MessageEmbed() .setColor('#88d4ef') .setDescription(randomEmbed) channel.send({ embeds: [bye] }); }); client.login("");
about 4 years ago · Juan Pablo Isaza
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!