member.dmChannel.awaitMessages() breaking when updating from v14.11 to v14.12
I currently have the following code which works perfectly in discord.js v14.11 however when I upgraded to v14.12, I started getting the following error
Cannot read properties of null (reading 'awaitMessages')
. This can't be an issue with the code since when I downgrade back to v14.11 it starts working perfectly again so I'm not sure what's going on.
14 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!Fetching a user doesn’t include the dm channel
You either have to open one or send a dm, if ur alr doing that
Why did it work in 14.11 though?
As well as every version of 14 prior to the current one
Also the bot does DM the user before awaiting the message
Await the user.send
I do that
Ur sending the message before calling awaitMessages?
Yeah, it's quite a bit higher in the function though
But there is definitely a DM open with the user before it tries to await a message
Can you show the whole function?
It's a little bit of a mess but sure
Oh, ur sharding
Yeah I don't have a choice unfortunately which adds extra complications to everything
I have a feeling this is a bug in 14.12.0 and above just because of the fact that it immediately fixes itself when I downgrade to 14.11.0.
Sorry I didn't see your original message but yeah that should do the same thing
<:pr_open:852715356622553088> #9774 in discordjs/discord.js by Jiralite opened <t:1691976884:R> (review required)
fix(Action): Do not add the client user as a recipient
Awesome, thanks.
Oh, I didn’t know I could do that, thanks so much for the tip!