Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

132
Vistas
Discord.js Webhooks 10 limit on channel

Every time a user send messages a webhook edits its name and shows message.author.username but after After some time maybe because of an error the webhook creates 2 or more webhooks and keeps showing message author names.

How to use only 1 webhook?


let webhook = await client.channels.cache.get(smchannel[i]).fetchWebhooks();
webhook = webhook.find(x => x.name === message.member.nickname ? message.member.nickname : message.author.username);
        
      
webhook = await client.channels.cache.get(smchannel[i]).createWebhook('Chat Guy', {
            
avatar: client.user.displayAvatarURL({ dynamic: true })});
        
        
await webhook.edit({
name: message.member.nickname ? message.member.nickname : message.author.username,
avatar: message.author.displayAvatarURL({ dynamic: true })})

webhook.send( content ).catch(err => { })

    }
});


about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

You are always creating a new webhook.

First of all, you don't need to find an exact name with author because you can customize webhooks before you sent a message.

let webhooks = await client.channels.cache.get(smchannel[i]).fetchWebhooks();
let webhook = webhooks.first()
if(!webhook){
 // create new webhook if not exists in channel
} else {
 // edit your webhook in here and send!
}
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda