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

133
Views
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 answers
Answer question

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 Report
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!