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

99
Visualizações
reacting to message just created

I want to make the bot react to it's own message. I am making a !vote command and it can make a message saying "Cast your vote: " already. I want to make a reaction to that new message, like an example, where it reacts with a checkmark and a red x for people to click on. How can I do this?

about 4 years ago · Juan Pablo Isaza
2 Respostas
Responde à pergunta

0

Sending a message returns a promise with said message. Resolve it and react to it.

message.channel.send(...)
    .then(msg => msg.react(...));

// or

const newMsg = await message.channel.send(...);
newMsg.react(...);
about 4 years ago · Juan Pablo Isaza Relatório

0

Here you go!:

client.on("messageCreate", msg => {
  if (msg.content === `!vote`) {
    msg.channel.send(`Cast your vote:`).then(msg => {
      msg.react("✅");
      msg.react("❎");
    })
  }
});
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