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

92
Views
how to createMessageCollector() on a dm channel

hey guys anybody know how to set up

message.channel.createMessageCollector

for a dm? tried

message.author.dmChannel.createMessageCollector

with no luck.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

All TextBasedChannels have the method called createMessageCollector so there's no difference between TextChannel and DMChannel.
You just need to call the method and pass options inside.

// Filter for the collector
const filter = m => m.content.includes('discord');

// Create the collector
const collector = channel.createMessageCollector({ filter, time: 15_000 });

// Listen for new messages and when collector ends
collector.on('collect', m => console.log(`Collected ${m.content}`));
collector.on('end', collected => console.log(`Collected ${collected.size} items`));
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!