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

239
Views
Discord.js react to all messages in channel

Iโ€™m trying to create a bot that should react with ๐Ÿ‘ and ๐Ÿ‘Ž to all messages sent in a specific channel.

Iโ€™ve watched tutorials on youtube and google, but nothing has worked so I must be missing something.

Iโ€™m currently on my phone - so I am unable to share my code as well as images atm. Though I can tell you that I have all handlers and commands in separate files and folders.

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

0

This should serve your purposes:

Discord v12

client.on('message', async message => {
    if (message.channel.id === 'channelId') {
        if (message.member.user.bot) return
        message.react('๐Ÿ‘').then(() => {
            message.react('๐Ÿ‘Ž')
        })
    }
})

Discord v13

client.on('messageCreate', async message => {
    if (message.channel.id === 'channelId') {
        if (message.member.user.bot) return
        message.react('๐Ÿ‘').then(() => {
            message.react('๐Ÿ‘Ž')
        })
    }
})

Keep in mind that, aside from bot messages, it will react to all messages with those emojis. Now if you are trying to create a suggestions channel, there are better and better looking ways to do that.

But I also agree with @Jan in your comments, please post meaningful questions with homework shown next time.

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!