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

255
Visualizações
How can I print the content of author.name and description(embed)?

I want to print the content of author.name an description of an embed, but I have no idea how.

Error:
Uncaught ReferenceError: author is not defined
const user = author.name;
  message.channel.send(`${user} !!!`);
  console.log(`${user} !!!`);

Example I want to return the name "Juan" of .setAuthor and "text" of .setDescription from the embed , It is not the name of the author of the message

const embed = new MessageEmbed()
    .setAuthor('Juan')
    .setColor('RANDOM')
    .setDescription("text")
      message.channel.send(embed);
about 4 years ago · Juan Pablo Isaza
2 Respostas
Responde à pergunta

0

Sounds like you need to use message.author.username

client.on((message) => {
const username = message.author.username;
  message.channel.send(`${username} !!!`);
  console.log(`${username} !!!`);
})
about 4 years ago · Juan Pablo Isaza Relatório

0

problem solved

if(message.embeds.length >= 0) 
  {
    let embed = message.embeds
    for(let i = 0; i < embed.length; i++)
    {
      if (!embed[i] || !embed[i].author || embed[i].author.name === null) return;
      {
      const string4 = (embed[i].author.name);
      message.channel.send(string4)
      }
    }
  }
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