webhook Discord.js

client.on("message", async message => {
  if (message.author.bot) return;
  if (message.webhookID) return;
  if (!message.content.startsWith(prefix)) return;
    let command = message.content.split(" ")[0];
    command = command.slice(prefix.length);
    let args = message.content.split(" ").slice(1);
    if (command == "قلله") {

  const avatar = message.author.avatarURL()
  let args = message.content.split(" ").slice(1);
  const webhooks = await message.channel.fetchWebhooks();
    const webhook = webhooks.first();

  if (!webhook) {
    webhook = await message.channel.createWebhook(`Islam webhook`, {
      avatar: client.user.displayAvatarURL()
    });
  }

    try {
        await webhook.send(args.join(""), {
            username: message.author.username,
            avatarURL: avatar,}

        );} catch (error) {console.error('Error trying to send: ', error);}}
});
EXATUBE™