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

77
Visualizações
Send message including button

I am using Discord.js v13.2. I need to send a message once ready. I am able to send a text message, but the button does not appear, so I guess I am not sending the parameter correctly.

client.once("ready", async () => {
  const button = new MessageButton()
    .setLabel("Go To Site")
    .setStyle("blue")
    .setCustomId("btn-go-to-site");

  const helpChannel = await client.channels.fetch(channelID);
  helpChannel.send('Welcome to Site', button);
});
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Discord.js v13 now only accepts 1 parameter in message sending, editing and replying. You must send the message with the content and components parameters.

helpChannel.send({
  content: "Welcome to Site",
  components: [
    new MessageActionRow().addComponents([button])
  ]
})

This must also be done with embeds, files, stickers and other message options

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