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

262
Views
ReactionCollector in Discord.js user.send() is not a function

I created a ReactionCollector for my Discord Bot, but if I want to send a message to the user the error user.send() is not a function comes up. My Discord.js version is v11.

    const filter = (reaction, user) => {
        return validEmojis.includes(reaction.emoji.name) && user.id !== bot.user.id;
};
    const collector = message.createReactionCollector(filter)

    collector.on('collect', (reaction, user) => {
        if (reaction.emoji.name === "๐Ÿ”Š") {
            user.send("hello")
        }       
    });

Log output of the reaction parameter in the ReactionCollector:

<ref *1> MessageReaction {
  message: Message {
  me: true,
  count: 2,
  users: Collection(1) [Map] {
    '342000434514493440' => User {
      id: '342000434514493440',
      username: 'TFS_NerzDesmony',
      discriminator: '7832',
      avatar: 'b05491a41564a2f32811b55d4ea44103',
      bot: false,
      lastMessageID: null,
      lastMessage: null
    }
  },
  _emoji: ReactionEmoji {
    reaction: [Circular *1],
    name: '๐Ÿ”Š',
    id: null,
    animated: false
  }
}

Hope anyone can help me solve this problem

about 4 years ago ยท Santiago Gelvez
1 answers
Answer question

0

Replace user.send("hello") by reaction.users.first().send("hello") according to MessageReaction since you are using Discord.js v11.

about 4 years ago ยท Santiago Gelvez 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!