Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

255
Vistas
I keep getting this error on my unban command discord.js v13

error

module.exports = { name: 'unban', description: "Used to unban members from a server", execute(message, args, Discord, client) {

if (!(message.member.roles.cache.some(r => r.id === "783700556472254525"))) return

  let reason;

  const user = await bot.users.fetch(args[0])

  if (!args[1])
  {
    reason = "Not specified"
  }

  else
  {
    reason = args[1]
  }

  const embed = new Discord.MessageEmbed()
  .setTitle(`${user.username} was unbanned!`)
  .setDescription(`${user.username} was unbanned by ${message.author.username} for: ${reason}`)
  .setColor("GREEN")
  .setFooter("Unban Command")
  .setTimestamp()

  message.channel.send(embed)

  message.guild.members.unban(user)
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

The error happens because to use await, the execute function has to be asynchronous, so all you have to do is add async before the execute like this: async execute() {}. This is why, it is better to actually spend some time and learn the language instead of copy pasting since many error like this can be easily answered.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda