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

290
Views
UnhandledPromiseRejectionWarning: DiscordAPIError: Invalid Form Body content: Must be 4000 or fewer in length

I'm making a discord bot that snipes edit, but it always shows

UnhandledPromiseRejectionWarning: DiscordAPIError: Invalid Form Body content: Must be 4000 or fewer in length."

but it the text never got up to 4000 characters in the first place

const { MessageEmbed, Discord } = require("discord.js")

module.exports.run = async(client, message, args, Discord) => {

  const esnipes = client.esnipes.get(message.channel.id)
  if(!esnipes) return message.reply({ content: 'There is nothin to snipe :|'})

  const esnipe = +args[0] - 1 || 0
  const target = esnipes[esnipe]
  if (!target) {
    message.reply(`There are ${snipes.length} to snipes.`)
  }
  const { newc, msg } = target
      new MessageEmbed() 
      .setAuthor(msg.author.tag, msg.author.displayAvatarURL({dynamic: true}))
      .addField('old Message', msg.content)
      .addField('New Content', newc.content)

      message.channel.send(MessageEmbed)
}

exports.conf = {
    enabled: true,
    guildOnly: true,
    aliase:["es"]
}

exports.help = {
    name:"editsnipe",
    description:"Empty",
    usage:"esnipes",
    category:"general"
}
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Here

message.channel.send(MessageEmbed)

MessageEmbed is a class. You may have wanted to use the one below

let embed = new MessageEmbed() 
      .setAuthor(msg.author.tag, msg.author.displayAvatarURL({dynamic: true}))
      .addField('old Message', msg.content)
      .addField('New Content', newc.content)
message.channel.send({ embeds: [embed] })
//on v12 you can just use message.channel.send(embed)
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!