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

145
Views
message.channel.awaitmessages() filter not working with constant id

I have this command that is supposed to only accept user inputs from me. I am trying to use this code but there is nothing in the console.

me = await client.users.fetch("< my id >")
mee = msg
mee.author = me
let filter = m => m.author.id === mee.author.id
msg.channel.awaitMessages(filter, { max: 1, time: 50000, errors: 
   ['time'], })
      .then(async (collected) => {
      mesg = collected.first
      console.log(mesg.content)
   })
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

There's really no reason to be fetching a user if the only thing you need is their ID - which you're already using for the fetch itself.

What you're currently trying to do - overriding the author of an existing message - doesn't really make much sense.

Your filter can (likely) be simplified down to the following.

let filter = m => m.author.id === "<your id>"
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!