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

100
Views
Discord.js webhook embed from JSON

I'm new in coding...
So I've been trying to make a webhook embed with raw JSON but the webhook doesn't seem to work.
This is what I used:

run: async (client, message, args) => {
    if (!message.member.hasPermission("MANAGE_WEBHOOKS")) {
      return message.channel.send(
        `You need to have permission to use this command!`
      );
    }
    message.delete();
    let user =
      message.mentions.members.first() ||
      message.guild.members.cache.get(args[0]);
    if (!user) return message.channel.send("Please provide a user!");
    const webhook = await message.channel.createWebhook(user.displayName, {
      avatar: user.user.displayAvatarURL(),
      channel: message.channel.id
    });
    let message2 = args.slice(1).join(" ")
    await webhook.send(message2).then(() => {
  
  let embed1 = JSON.parse(message2);

  return message.channel.send({embed: embed1});
      webhook.delete();
    });
  }
};

It sends both the JSON and its embed...
I need help

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!