Display all webhooks in the current discord server discord.js

I am trying to make a command to display every webhook made in the specific guild, I thought this would work:

let allwebhooks = "";
  message.guilds.cache.forEach(webhook => {
    allwebhooks += `${hook.name}, `;
  let webhookembed = new Discord.MessageEmbed()
  .setTitle(`There are ${hook.size} webhooks in: **${message.guild.name}**:`)
    `Webhooks: \n **${allwebhooks.slice(
      allwebhooks.length - 2

But I get this error:

TypeError: Cannot read property ‘cache’ of undefined

97 thoughts on “Display all webhooks in the current discord server discord.js”

  1. 989458 400105Spot ill carry on with this write-up, I truly believe this site requirements a fantastic deal much more consideration. Ill oftimes be once a lot more to see far more, several thanks that info. 457582


Leave a Comment