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

195
Views
Discord.js send message to specific channel and react to it

I know you can do something like this:

const channel = await client.channels.fetch("Channel id");
  channel.send('Message');

But what if I wanted to react to the message I sent? You need the message object to react right?

about 4 years ago ยท Juan Pablo Isaza
1 answers
Answer question

0

The TextChannel#send returns a Promise<Message>. You'll have to await the message to be sent to be able to react to it.

const channel = await client.channels.fetch('Channel id');
const message = await channel.send('Message');
await message.react('๐Ÿ‘');
console.log('Reacted to message.');
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!