message collector not working?
Hello my bot has a message collector and it has been working for the longest time untill I swapped to djs14 I didn’t touch the code for the collector but turns out it no longer works?
The channel is the correct channel and when the collector expires the on end gets executed but there is no on collect that gets executed when the user types anything, even without a filter no messages are collected.
Any clues?
8 Replies
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Not a discord.js issue? Check out #other-js-ts.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!
- ✅
Marked as resolved by staffYou should read guide about updating your code to v14
Cant find anything about message collector though
First of all show your code
Am on phone rn so sorry for bad formatting
const collector = cmd.channel.createMessageCollector({
filter: (msg) => msg.author.id === cmd.member.id,
idle: 30*1000
});
collector.on((collected) => console.log(collected));
cmd.channel is a valid channel
And it is infeed the channel that it’s supposed to collect in
do you have the required intents
namely Guilds and GuildMessages
Yes
Bot is also approved for the message intent
Yeah I was on phone sec
Here you go:
yeah I'm still passing strings as intents
thats prob the issue
Yup
that was the issue
weird ts doesnt give error for that