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

264
Views
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 answers
Answer question

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 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!