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

274
Vistas
DiscordAPIError: Cuerpo de formulario no válido - Discord.js Embed

Oye, estaba tratando de hacer un botón de url para mi inserción cuando se envió en slashCommand, pero cuando intenté poner el botón y usar el comando, obtuve un error de: DiscordAPIError: Cuerpo de formulario no válido

No sé por qué aparece ese error y mi inserción no funciona/envía.

Nodo: v17.7.2

Discordia.js: 13.2.0

Aquí está mi comando:

 const { Client, CommandInteraction } = require("discord.js"); const { MessageEmbed } = require('discord.js'); const ee = require('../../config.json'); const { MessageActionRow, MessageButton } = require('discord.js'); module.exports = { name: "help", description: "Show all the commands", /** * * @param {Client} client * @param {CommandInteraction} interaction * @param {String[]} args */ run: async (client, interaction, args) => { let music = [ "\`play:\` Play a song from YouTube, SoundCloud, & Spotify", "\`pause:\` Pause the current playing music.", "\`resume:\` Resume the pause music.", "\`stop:\` Stop the music.", '\`loop:\` Loop the current music or the queqe.', '\`autoplay:\` Autoplay music for you.', '\`queue:\` Show the music queue.', '\`volume:\` Adjust the volume of the music.', '\`seek:\` Rewind the current song to the specified position.', '\`shuffle:\` Shuffle the music playlist or the queue.', '\`nowplaying:\` Show the Current music playing.', '\`save:\` Save the current playing music.', '\`lyrics:`\ Display the lyrics of the current playing music.', '`\filter:` Put a filter to a song.' ] let info = [ '\`ping:\` Pings H_M.', '\`help:\` Shows all the H_M command lists.', '\`links:\` Information about H_M.', '`\avatar:\` Shows the avatar of a user.' ] const helpembed = new MessageEmbed() .setThumbnail(client.user.displayAvatarURL()) .setColor(ee.color) .setTitle(`📫 | Command list of ${client.user.username}`) .setDescription(`**🎵 - Music**\n• ${music.join("\n • ")}\n**⚙️ - Information**\n• ${info.join("\n • ")}`) const row = new MessageActionRow() .addComponents( new MessageButton() .setLabel('Click here.') .setStyle('url') .setURL('https://example.com'), ); interaction.followUp({ embeds: [helpembed], components: [row] }); }, };

Traté de seguir lo que decía en estos documentos: https://discordjs.guide/interactions/buttons.html#building-and-sending-buttons pero parece que hice algo mal...

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Según la guía oficial de discord.js sobre botones =>Botones | Discord.js , hay 5 estilos que puede aplicar a los botones: PRIMARY SECONDARY SUCCESS DANGER LINK . Supongo que desea crear un botón que lleve a algún lugar como un enlace, así que en lugar de que el estilo de su botón sea url , cámbielo a LINK para que sea algo como esto => .setURL('LINK')

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