Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

272
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda